diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 15ffaed7..7f330aac 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -144,15 +144,14 @@ func rtmpWrite(r *C.RTMP, data []byte) int { s2 -= 13 } - buf = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(1))) pkt.m_packetType = C.uchar(*(*byte)(unsafe.Pointer(buf))) - + buf = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(1))) pkt.m_nBodySize = C.AMF_DecodeInt24(buf) buf = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(3))) pkt.m_nTimeStamp = C.AMF_DecodeInt24(buf) - buf = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(4))) - pkt.m_nTimeStamp |= C.uint(*(*byte)(unsafe.Pointer(buf)) << 24) buf = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(3))) + pkt.m_nTimeStamp |= C.uint(*(*byte)(unsafe.Pointer(buf)) << 24) + buf = (*C.char)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(4))) s2 -= 11 if ((pkt.m_packetType == C.RTMP_PACKET_TYPE_AUDIO ||