mirror of https://bitbucket.org/ausocean/av.git
Ported AMF_Reset - tested and working
This commit is contained in:
parent
11bc432b54
commit
62a1f6dec1
16
rtmp/rtmp.go
16
rtmp/rtmp.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue