[FFmpeg-devel] av_open_input_file memory leak?

Michael Niedermayer michaelni
Sat May 26 11:43:10 CEST 2007


Hi

On Sat, May 26, 2007 at 09:54:02AM +0200, Emanuele Fumagalli wrote:
> 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?

as said we need valgrind output without that there is a 98% chance that
noone will look into this
and without a sample file to reproduce it theres a 99.9% chance that noone
will look into it ...
additioanlly top posting worsens the chances further ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070526/4968aa66/attachment.pgp>



More information about the ffmpeg-devel mailing list