3 ms·
Yes, ffmpeg is one hell of a library and documentation doesn't make things easier. You have to ask a lot of questions to understand the low level details, and a
by warangal 4y ago
Yes, ffmpeg is one hell of a library and documentation doesn't make things easier. You have to ask a lot of questions to understand the low level details, and also have to answer them yourself by doing experiments.
For the point about packet freeing, i think ``av_packet_unref`` is supposed to de-reference the ``encoded video/audio`` data being read in the RAM, so that internal ffmpeg code can deallocate it. It has to be called for every ``av_read_frame``. ``av_packet_free`` is supposed to release the generic ``packet`` object/struct allocated by ``av_packet_alloc``.
I learnt this while making a simple video player based on ffmpeg library.