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

Harald Jordan harald.jordan at redstream.at
Mon Dec 24 10:25:50 CET 2012


Hm, that is hard to tell, the way ffmpeg and my code works is different: i
have a dll thats runtime stays alive for multiple independent transcoding
runs, ffmpeg ends it's runtime everytime a file is ready transcoded. 
So I assume even if there is a problem in ffmpeg base application, it is not
worth the effort of debugging? ;-)

All the best,
Harry

-----Ursprüngliche Nachricht-----
Von: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-bounces at ffmpeg.org]
Im Auftrag von Nicolas George
Gesendet: Sunday, December 23, 2012 5:29 PM
An: FFmpeg user questions
Betreff: Re: [FFmpeg-user] avformat_free_context function is not able to
free the stuff that was cached by avcodec_encode_video2

> 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.

Regards,

--
  Nicolas George



More information about the ffmpeg-user mailing list