Internal compiler error

This commit is contained in:
saxon 2018-07-19 16:51:16 +09:30
parent 346774ee35
commit 232cb2280f
1 changed files with 8 additions and 7 deletions

View File

@ -139,7 +139,7 @@ const (
// memmove copies n bytes from "from" to "to". // memmove copies n bytes from "from" to "to".
//go:linkname memmove runtime.memmove //go:linkname memmove runtime.memmove
//func memmove(to, from unsafe.Pointer, n uintptr) func memmove(to, from unsafe.Pointer, n uintptr)
// av_setDataFrame is a static const global in rtmp.c // av_setDataFrame is a static const global in rtmp.c
var setDataFrame = AVC("@setDataFrame") var setDataFrame = AVC("@setDataFrame")
@ -515,7 +515,8 @@ func afmEncodeString(output *byte, outend *byte, bv *C.AVal) *byte {
outputPtr = unsafe.Pointer(C.AMF_EncodeInt32((*C.char)(outputPtr), outputPtr = unsafe.Pointer(C.AMF_EncodeInt32((*C.char)(outputPtr),
(*C.char)(outendPtr), bv.av_len)) (*C.char)(outendPtr), bv.av_len))
} }
C.memcpy(unsafe.Pointer(outputPtr), unsafe.Pointer(bv.av_val), (C.size_t)(bv.av_len)) memmove(unsafe.Pointer(outputPtr), unsafe.Pointer(bv.av_val), uintptr(bv.av_len))
//C.memcpy(unsafe.Pointer(outputPtr), unsafe.Pointer(bv.av_val), (C.size_t)(bv.av_len))
incBytePtr(outputPtr, int(bv.av_len)) incBytePtr(outputPtr, int(bv.av_len))
return (*byte)(outputPtr) return (*byte)(outputPtr)
@ -783,11 +784,11 @@ func sendPacket(r *C.RTMP, packet *C.RTMPPacket, queue int) int {
(*C.RTMPPacket)(C.malloc(C.size_t(unsafe.Sizeof(*packet)))) (*C.RTMPPacket)(C.malloc(C.size_t(unsafe.Sizeof(*packet))))
} }
//memmove(incPtr(unsafe.Pointer(r.m_vecChannelsOut),int(packet.m_nChannel), memmove(incPtr(unsafe.Pointer(r.m_vecChannelsOut), int(packet.m_nChannel),
//int(unsafe.Sizeof(packet))),unsafe.Pointer(packet), unsafe.Sizeof(packet)) int(unsafe.Sizeof(packet))), unsafe.Pointer(packet), unsafe.Sizeof(packet))
C.memcpy(unsafe.Pointer(*(**C.RTMPPacket)(incPtr(unsafe.Pointer(r.m_vecChannelsOut), //C.memcpy(unsafe.Pointer(*(**C.RTMPPacket)(incPtr(unsafe.Pointer(r.m_vecChannelsOut),
int(packet.m_nChannel), int(unsafe.Sizeof(packet))))), unsafe.Pointer(packet), //int(packet.m_nChannel), int(unsafe.Sizeof(packet))))), unsafe.Pointer(packet),
C.size_t(uintptr(unsafe.Sizeof(*packet)))) //C.size_t(uintptr(unsafe.Sizeof(*packet))))
return 1 return 1
} }