Ported AMF_Reset - tested and working

This commit is contained in:
saxon 2018-08-15 04:28:34 +09:30
parent 11bc432b54
commit 62a1f6dec1
1 changed files with 15 additions and 1 deletions

View File

@ -2232,10 +2232,24 @@ func C_HandleInvoke(r *C.RTMP, body *byte, nBodySize uint32) int32 {
*/
}
leave:
C.AMF_Reset(&obj)
C_AMF_Reset(&obj)
return ret
}
// void AMF_Reset(AMFObject* obj);
// amf.c +1282
func C_AMF_Reset(obj *C.AMFObject) {
var n int32
for n = 0; n < int32(obj.o_num); n++ {
// TODO Port AMFProp_Reset
C.AMFProp_Reset(&(*(*C.AMFObjectProperty)(incPtr(unsafe.Pointer(obj.o_props),
int(n), int(unsafe.Sizeof(*obj.o_props))))))
}
C.free(unsafe.Pointer(obj.o_props))
obj.o_props = nil
obj.o_num = 0
}
// int SendReleaseStream(RTMP* r);
// rtmp.c +1816
func C_SendReleaseStream(r *C.RTMP) int32 {