From a24003af44cdbeb43d76b4b99442eb263a3f2adf Mon Sep 17 00:00:00 2001 From: saxon Date: Tue, 17 Jul 2018 03:17:17 +0930 Subject: [PATCH] Having a lot of trouble --- rtmp/rtmp.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index be08f895..6eb43753 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -336,7 +336,7 @@ func sendPacket(r *C.RTMP, packet *C.RTMPPacket, queue int) int { } if cSize != 0 { - header = decBytePtr(header,4) + header = decBytePtr(header,cSize) hSize += cSize } @@ -380,9 +380,10 @@ func sendPacket(r *C.RTMP, packet *C.RTMPPacket, queue int) int { } if nSize > 4 { - *(*byte)(hptr) = byte(packet.m_packetType) hptr = unsafe.Pointer(C.AMF_EncodeInt24((*C.char)(hptr), (*C.char)(hend), C.int(packet.m_nBodySize))) + *(*byte)(hptr) = byte(packet.m_packetType) + hptr = incBytePtr(hptr,1) } if nSize > 8 {