From 0ae81ef52ae57b75b3b2934f298ae90503b905f0 Mon Sep 17 00:00:00 2001 From: saxon Date: Sun, 29 Jul 2018 09:45:14 +0930 Subject: [PATCH] Using my amfEncodeNumber - tested and working --- rtmp/rtmp.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index e5ada2d9..2556a58e 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -963,9 +963,9 @@ func sendConnectPacket(r *C.RTMP, cp *C.RTMPPacket) int { //(*C.char)(unsafe.Pointer(pend)), &av_connect))) enc = amfEncodeString(enc, pend, &av_connect) r.m_numInvokes += 1 - enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNumber((*C.char)(unsafe.Pointer(enc)), - (*C.char)(unsafe.Pointer(pend)), C.double(r.m_numInvokes)))) - //enc = amfEncodeNumber(enc, pend, float64(r.m_numInvokes)) + //enc = (*byte)(unsafe.Pointer(C.AMF_EncodeNumber((*C.char)(unsafe.Pointer(enc)), + //(*C.char)(unsafe.Pointer(pend)), C.double(r.m_numInvokes)))) + enc = amfEncodeNumber(enc, pend, float64(r.m_numInvokes)) *indxBytePtr(unsafe.Pointer(enc), 0) = AMF_OBJECT