Using our amfEncodeInt32 - tested and working

This commit is contained in:
saxon 2018-07-28 16:44:27 +09:30
parent 93104c1539
commit 7ddd2ac6d1
1 changed files with 3 additions and 1 deletions

View File

@ -877,6 +877,7 @@ func rtmpSockBufFill(sb *C.RTMPSockBuf) int {
int(uintptr(unsafe.Pointer(sb.sb_start))-uintptr(unsafe.Pointer( int(uintptr(unsafe.Pointer(sb.sb_start))-uintptr(unsafe.Pointer(
&sb.sb_buf[0]))) &sb.sb_buf[0])))
// TODO: figure out what to do with recv
nBytes = int(C.recv(sb.sb_socket, unsafe.Pointer(uintptr(unsafe.Pointer( 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)) 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 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 r.m_nBytesInSent = r.m_nBytesIn