mirror of https://bitbucket.org/ausocean/av.git
Using my amfDecodeString but need to fix amfDecodeInt16 - tested and working
This commit is contained in:
parent
6978e73aee
commit
084f7ce52b
|
@ -1391,6 +1391,7 @@ func rtmpSendPacket(r *C.RTMP, packet *C.RTMPPacket, queue int) int {
|
|||
}
|
||||
|
||||
if nSize > 8 {
|
||||
// TODO: port this
|
||||
hptr = incBytePtr(hptr, int(C.EncodeInt32LE((*C.char)(hptr),
|
||||
C.int(packet.m_nInfoField2))))
|
||||
}
|
||||
|
@ -1482,8 +1483,8 @@ func rtmpSendPacket(r *C.RTMP, packet *C.RTMPPacket, queue int) int {
|
|||
var method C.AVal
|
||||
var ptr unsafe.Pointer
|
||||
ptr = incBytePtr(unsafe.Pointer(packet.m_body), 1)
|
||||
C.AMF_DecodeString((*C.char)(ptr), &method)
|
||||
//amfDecodeString((*byte)(ptr), &method)
|
||||
//C.AMF_DecodeString((*C.char)(ptr), &method)
|
||||
amfDecodeString((*byte)(ptr), &method)
|
||||
|
||||
if debugMode {
|
||||
log.Printf("Invoking %v", method.av_val)
|
||||
|
@ -1660,7 +1661,8 @@ func amfEncodeNamedString(output *byte, outend *byte, strName *C.AVal, strValue
|
|||
// amfDecodeString decodes data into a string inside a AVal
|
||||
func amfDecodeString(data *byte, bv *C.AVal) {
|
||||
dataPtr := unsafe.Pointer(data)
|
||||
bv.av_len = C.int(amfDecodeInt16((*byte)(dataPtr)))
|
||||
bv.av_len = C.int(C.AMF_DecodeInt16((*C.char)(dataPtr)))
|
||||
//bv.av_len = C.int(amfDecodeInt16((*byte)(dataPtr)))
|
||||
if bv.av_len > 0 {
|
||||
bv.av_val = (*C.char)(incBytePtr(dataPtr, 2))
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue