3d0c / gmf

Go Media Framework
MIT License
891 stars 170 forks source link

Memory leak fix #101

Closed 3d0c closed 5 years ago

3d0c commented 5 years ago

Various memory leaks has been fixed. If you still face some, please refer to "examples/stress.go" to see how to proper cleanup allocated instances.

niklaskorz commented 5 years ago

This pull request removed the send receive api introduced in 68647d5, why?

3d0c commented 5 years ago

I guess you mean following methods:

func (p *Packet) Frames(cc *CodecCtx) (*Frame, error) and func (p *Packet) ReceiveFrame(cc *CodecCtx) (*Frame, int)

I just moved encode/decode routines into Codec Context, it has now better error handling, supports multiple frames and codec drain (pass nil instead of frame).

niklaskorz commented 5 years ago

Thanks! I failed to see that, my apologies.