mirror of https://bitbucket.org/ausocean/av.git
ported DecodeInt32LE - still need to test
This commit is contained in:
parent
7111456991
commit
d480f427c1
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue