Can't understand this bug I have

This commit is contained in:
saxon 2018-07-28 11:25:35 +09:30
parent 656bec1cfd
commit 5a6c6837ea
1 changed files with 5 additions and 3 deletions

View File

@ -1331,8 +1331,8 @@ func sendPacket(r *C.RTMP, packet *C.RTMPPacket, queue int) int {
ptr = incBytePtr(ptr, 3+int(method.av_len))
txn = int(amfDecodeNumber((*byte)(ptr)))
// TODO: port this
avQueue(&r.m_methodCalls, (*int)(unsafe.Pointer(&r.m_numCalls)), &method,
int(txn))
C.AV_queue(&r.m_methodCalls, (*C.int)(unsafe.Pointer(&r.m_numCalls)), &method,
C.int(txn))
}
}
@ -1602,7 +1602,9 @@ func amfEncodeInt32(output *byte, outend *byte, nVal int32) *byte {
func realloc(ptr unsafe.Pointer, size int) unsafe.Pointer {
dest := allocate(uintptr(size))
memmove(dest, ptr, uintptr(size))
if ptr != nil {
memmove(dest, ptr, uintptr(size))
}
return dest
}