From 4819cc92eccd6779ba2d41ba1b5bca30542a2ad8 Mon Sep 17 00:00:00 2001 From: saxon Date: Fri, 13 Jul 2018 02:46:05 +0930 Subject: [PATCH] Fixed to the extent that youtube thinks stream is starting but nothing playing --- rtmp/rtmp.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 ||