[FFmpeg-devel] av_open_input_file memory leak?

Emanuele Fumagalli emanuele.fumagalli
Sat May 26 09:54:02 CEST 2007


I read "Reporting a Bug To The FFmpeg Project" and I think I'm in the right 
mailing list for posting this, otherwise redirect me to another forum.
As suggested I uploaded the example file and txt in Mplayer/Incoming/Memory 
leak open_input.

I reproduced the memory leak with these lines of code:

av_register_all();
AVFormatContext* m_context;
for(int i = 0; i < 100; i++)
{
av_open_input_file(&m_context, "c:\\sheryl.mp4.001", 0, 0, NULL);
if (m_context)
{
    av_close_input_file(m_context);
    m_context = NULL;
}

If the file is complete(with full header) no memory leak, if the file is 
truncated at the beginning not preserving entire header I get memory leak of 
around 5 Mb at each av_open_input_file.

Is that a memory leak or I'm missing something?

Thanks



----- Original Message ----- 
From: "Emanuele Fumagalli" <emanuele.fumagalli at babelgum.com>
To: "FFmpeg development discussions and patches" <ffmpeg-devel at mplayerhq.hu>
Sent: Friday, May 25, 2007 2:35 PM
Subject: Re: [FFmpeg-devel] av_open_input_file memory leak?


> Hi,
> thanks for answering, currently I'm using windows but I'll look for some
> similar software.
> Anyway I don't have the memory leak if I open a complete file, so I was 
> just
> wondering if there was a way to clean all the memory allocated by ffmpeg
> library without closing the application.
> I'm sorry if the question is not related to development but I couldn't 
> find
> any documentation about this issue.
>
> thanks again
>
>
> ----- Original Message ----- 
> From: "Michael Niedermayer" <michaelni at gmx.at>
> To: "FFmpeg development discussions and patches" 
> <ffmpeg-devel at mplayerhq.hu>
> Sent: Friday, May 25, 2007 2:21 PM
> Subject: Re: [FFmpeg-devel] av_open_input_file memory leak?
>
>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at mplayerhq.hu
>> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
> 





More information about the ffmpeg-devel mailing list