[Ffmpeg-devel] Memory leakage when using libavcodec with ffmpeg2theora

Måns Rullgård mru
Wed May 11 20:59:42 CEST 2005


Viktor Kompaneyets <vato at wnet.ua> writes:

>> >> On Wed, May 11, 2005 at 06:20:37PM +0300, Viktor Kompaneyets wrote:
>> >> > To where should I put it?
>> >>
>> >> http://ffmpeg.sourceforge.net/ffmpeg-bugreport.html
>> >
>> > Done
>> > files are memory_leak.(mpg & *.txt)
>>
>> valgrind doesn't report any leaks when running ffmpeg on that file.
>> However, valgrind on ffmpeg2theora reports, in addition to a large
>> number of buffer overflows and other nasty stuff, a number of memory
>> leaks.  Looks like we've found someone to blame.
>
> But the problem in ffmpeg exist!

So prove it.  The sample you provided decodes without leaving a single
byte of memory unaccounted for, when using ffmpeg.  Running
ffmpeg2theora on the same clip leaks memory:

==24273== ERROR SUMMARY: 365 errors from 20 contexts (suppressed: 0 from 0)
==24273== malloc/free: in use at exit: 6151729 bytes in 78 blocks.
==24273== malloc/free: 6534 allocs, 6456 frees, 31822077 bytes allocated.
==24273== For counts of detected errors, rerun with: -v
==24273== searching for pointers to 78 not-freed blocks.
==24273== checked 7487308 bytes.
==24273== 
==24273== LEAK SUMMARY:
==24273==    definitely lost: 470742 bytes in 35 blocks.
==24273==      possibly lost: 5627024 bytes in 15 blocks.
==24273==    still reachable: 53963 bytes in 28 blocks.

To me, this indicates that the problem is in ffmpeg2theora, and
nowhere else.

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list