[FFmpeg-user] avformat_free_context function is not able to free the stuff that was cached by avcodec_encode_video2

Nicolas George nicolas.george at normalesup.org
Sun Dec 23 17:28:47 CET 2012

> I am not sure if this should to to the ffmpeg or libavcodec dev mailing
> lists, but here is what I learned today:
> avcodec_encode_video2 has the ability to cache stuff on its own if neede
> (e.g GOP Encoding). Now from my dll application I learned that:
> -) avcodec_encode_video2 seems to cache raw (the input buffer) instead of
> only the encoded packet->data (I expected else), this can be seen by
> checking the growth of memory before and after this function call
> -) avformat_free_context(AVFormatContext outputcontext) did not free the
> memory that the  avcodec_encode_video2 function allocated all over

Does this happen with the ffmpeg command-line tool too? It is regularly
tested for memory leaks. If there is none in the command-line tool, maybe
something is wrong in your program.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20121223/8a293c95/attachment.asc>

More information about the ffmpeg-user mailing list