mirror of https://bitbucket.org/ausocean/av.git
Using my amfEncodeEcmaArray - tested and working
This commit is contained in:
parent
a1a8289a7f
commit
56a7bede73
rtmp
|
@ -1156,7 +1156,8 @@ func amfPropEncode(p *C.AMFObjectProperty, pBuffer *byte, pBufEnd *byte) *byte {
|
||||||
//pBuffer = (*byte)(unsafe.Pointer(C.AMF_Encode(&p.p_vu.p_object, (*C.char)(
|
//pBuffer = (*byte)(unsafe.Pointer(C.AMF_Encode(&p.p_vu.p_object, (*C.char)(
|
||||||
//unsafe.Pointer(pBuffer)), (*C.char)(unsafe.Pointer(pBufEnd)))))
|
//unsafe.Pointer(pBuffer)), (*C.char)(unsafe.Pointer(pBufEnd)))))
|
||||||
case AMF_ECMA_ARRAY:
|
case AMF_ECMA_ARRAY:
|
||||||
pBuffer = (*byte)(unsafe.Pointer(C.AMF_EncodeEcmaArray(&p.p_vu.p_object, (*C.char)(unsafe.Pointer(pBuffer)), (*C.char)(unsafe.Pointer(pBufEnd)))))
|
pBuffer = amfEncodeEcmaArray(&p.p_vu.p_object, pBuffer, pBufEnd)
|
||||||
|
//pBuffer = (*byte)(unsafe.Pointer(C.AMF_EncodeEcmaArray(&p.p_vu.p_object, (*C.char)(unsafe.Pointer(pBuffer)), (*C.char)(unsafe.Pointer(pBufEnd)))))
|
||||||
case AMF_STRICT_ARRAY:
|
case AMF_STRICT_ARRAY:
|
||||||
pBuffer = (*byte)(unsafe.Pointer(C.AMF_EncodeArray(&p.p_vu.p_object, (*C.char)(unsafe.Pointer(pBuffer)), (*C.char)(unsafe.Pointer(pBufEnd)))))
|
pBuffer = (*byte)(unsafe.Pointer(C.AMF_EncodeArray(&p.p_vu.p_object, (*C.char)(unsafe.Pointer(pBuffer)), (*C.char)(unsafe.Pointer(pBufEnd)))))
|
||||||
default:
|
default:
|
||||||
|
@ -1194,7 +1195,7 @@ func amfEncode(obj *C.AMFObject, pBuffer *byte, pBufEnd *byte) *byte {
|
||||||
return pBuffer
|
return pBuffer
|
||||||
}
|
}
|
||||||
|
|
||||||
func amfEncodeEcmaArray(obj *AMFObject, pBuffer *byte, pBufEnd *byte) *byte {
|
func amfEncodeEcmaArray(obj *C.AMFObject, pBuffer *byte, pBufEnd *byte) *byte {
|
||||||
if int(uintptr(unsafe.Pointer(pBuffer)))+4 >= int(uintptr(unsafe.Pointer(pBufEnd))) {
|
if int(uintptr(unsafe.Pointer(pBuffer)))+4 >= int(uintptr(unsafe.Pointer(pBufEnd))) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue