diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 07b5a472..86ba404a 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -1289,7 +1289,7 @@ func C_RTMP_ConnectStream(r *C.RTMP, seekTime int32) int { return int(r.m_bPlaying) } -func rtmpReadPacket(r *C.RTMP, packet *C.RTMPPacket) int32 { +func C_RTMP_ReadPacket(r *C.RTMP, packet *C.RTMPPacket) int32 { var hbuf [RTMP_MAX_HEADER_SIZE]uint8 memset((*byte)(&hbuf[0]), 0, RTMP_MAX_HEADER_SIZE) var header *byte @@ -1299,7 +1299,7 @@ func rtmpReadPacket(r *C.RTMP, packet *C.RTMPPacket) int32 { var extendedTimestamp int32 if C_ReadN(r, (*byte)(&hbuf[0]), 1) == 0 { - log.Println("rtmpReadPacket: failed to read RTMP packet header!") + log.Println("C_RTMP_ReadPacket: failed to read RTMP packet header!") return 0 } @@ -1310,7 +1310,7 @@ func rtmpReadPacket(r *C.RTMP, packet *C.RTMPPacket) int32 { switch { case packet.m_nChannel == 0: if C_ReadN(r, (*byte)(&hbuf[1]), 1) != 1 { - log.Println("rtmpReadPacket: failed to read rtmp packet header 2nd byte.") + log.Println("C_RTMP_ReadPacket: failed to read rtmp packet header 2nd byte.") return 0 } @@ -1321,7 +1321,7 @@ func rtmpReadPacket(r *C.RTMP, packet *C.RTMPPacket) int32 { var tmp int32 if C_ReadN(r, (*byte)(&hbuf[1]), 2) != 2 { - log.Println("rtmpReadPacket: failed to read RTMP packet 3rd byte") + log.Println("C_RTMP_ReadPacket: failed to read RTMP packet 3rd byte") return 0 } @@ -1382,7 +1382,7 @@ func rtmpReadPacket(r *C.RTMP, packet *C.RTMPPacket) int32 { nSize-- if nSize > 0 && C_ReadN(r, header, int(nSize)) != int(nSize) { - log.Println("rtmpReadPacket: failed to read rtmp packet header.") + log.Println("C_RTMP_ReadPacket: failed to read rtmp packet header.") return 0 } @@ -1452,7 +1452,7 @@ func rtmpReadPacket(r *C.RTMP, packet *C.RTMPPacket) int32 { if C_ReadN(r, (*byte)(incBytePtr(unsafe.Pointer(packet.m_body), int(packet.m_nBytesRead))), int(nChunk)) != int(nChunk) { - log.Println("rtmpReadPacket: failed to read RTMP packet body") + log.Println("C_RTMP_ReadPacket: failed to read RTMP packet body") return FALSE }