From d480f427c15b1f3c4305c1c0da81afefef05155c Mon Sep 17 00:00:00 2001 From: saxon Date: Sat, 11 Aug 2018 13:52:32 +0930 Subject: [PATCH] ported DecodeInt32LE - still need to test --- rtmp/rtmp.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index a2d9a947..b4036865 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -1945,7 +1945,14 @@ func C_RTMP_ReadPacket(r *C.RTMP, packet *C.RTMPPacket) int32 { } // static int DecodeInt32LE(const char* data); -// rtmp.c +// rtmp.c +3527 +func C_DecodeInt32LE(data *byte) int { + var c *uint8 = (*uint8)(data) + return int((*indxBytePtr(unsafe.Pointer(c), 3) << 24) | + (*indxBytePtr(unsafe.Pointer(c), 2) << 16) | + (*indxBytePtr(unsafe.Pointer(c), 1) << 8) | + *c) +} // #define RTMPPacket_IsReady(a) // rtmp.h +142