diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 5c0077ce..438c6284 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -877,6 +877,7 @@ func rtmpSockBufFill(sb *C.RTMPSockBuf) int { int(uintptr(unsafe.Pointer(sb.sb_start))-uintptr(unsafe.Pointer( &sb.sb_buf[0]))) + // TODO: figure out what to do with recv nBytes = int(C.recv(sb.sb_socket, unsafe.Pointer(uintptr(unsafe.Pointer( sb.sb_start))+uintptr(int(sb.sb_size))), C.size_t(nBytes), 0)) @@ -906,7 +907,8 @@ func sendBytesReceived(r *C.RTMP) int { packet.m_nBodySize = 4 - C.AMF_EncodeInt32(packet.m_body, (*C.char)(unsafe.Pointer(pend)), r.m_nBytesIn) + amfEncodeInt32((*byte)(unsafe.Pointer(packet.m_body)), pend, int32(r.m_nBytesIn)) + // C.AMF_EncodeInt32(packet.m_body, (*C.char)(unsafe.Pointer(pend)), r.m_nBytesIn) r.m_nBytesInSent = r.m_nBytesIn