Fixed to the extent that youtube thinks stream is starting but nothing playing

This commit is contained in:
saxon 2018-07-13 02:46:05 +09:30
parent 7b20e8f767
commit 4819cc92ec
1 changed files with 3 additions and 4 deletions

View File

@ -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 ||