radek-k / FFMediaToolkit

FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
MIT License
357 stars 56 forks source link

Avoid memory leaks by wiping internally allocated data from packet af… #47

Closed kskalski closed 3 years ago

kskalski commented 3 years ago

…ter it gets used (or skipped).

I suppose memory allocations and deallocations could be avoided by using av_new_packet with/instead of av_packet_alloc, but I didn't test that yet and I'm not sure what buffer sizes it would have to use.