Using my rtmp_read_packet is crashing

This commit is contained in:
saxon 2018-08-11 12:30:11 +09:30
parent 6137df30b3
commit a20beaf75e
1 changed files with 3 additions and 2 deletions

View File

@ -1505,7 +1505,7 @@ func C_SendConnectPacket(r *C.RTMP, cp *C.RTMPPacket) int {
enc = (*byte)(incBytePtr(unsafe.Pointer(enc), 1))
*indxBytePtr(unsafe.Pointer(enc), 0) = 0
enc = (*byte)(incBytePtr(unsafe.Pointer(enc), 1))
*indxBytePtr(unsafe.Pointer(enc), 0) = C.AMF_OBJECT_END
*indxBytePtr(unsafe.Pointer(enc), 0) = AMF_OBJECT_END
enc = (*byte)(incBytePtr(unsafe.Pointer(enc), 1))
/* add auth string */
@ -1707,7 +1707,8 @@ func C_RTMP_ConnectStream(r *C.RTMP, seekTime int32) int {
// TODO: read packet
for r.m_bPlaying == 0 && C_RTMP_IsConnected(r) != 0 &&
C.RTMP_ReadPacket(r, &packet) != 0 {
// C.RTMP_ReadPacket(r, &packet) != 0 {
C_RTMP_ReadPacket(r, &packet) != 0 {
// TODO: port is ready
if C_RTMPPacket_IsReady(&packet) != 0 {