ported DecodeInt32LE - still need to test

This commit is contained in:
saxon 2018-08-11 13:52:32 +09:30
parent 7111456991
commit d480f427c1
1 changed files with 8 additions and 1 deletions

View File

@ -1945,7 +1945,14 @@ func C_RTMP_ReadPacket(r *C.RTMP, packet *C.RTMPPacket) int32 {
} }
// static int DecodeInt32LE(const char* data); // 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) // #define RTMPPacket_IsReady(a)
// rtmp.h +142 // rtmp.h +142