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

Måns Rullgård mru
Thu May 12 20:37:53 CEST 2005

Viktor Kompaneyets <vato at wnet.ua> writes:

>> You might want to rerun the test with show-reachables=yes; this
>> will give you a dump of where the memory that is reachable is
>> malloced.
> I'll do it tomorrow.
> only one question - should I use ffmpeg_g for test?


>> I think you'll find that these are static defines, not reoccurring;
>> with the version I'm using, the mallocs occur in MPV_encode_init,
>> line 596 of mpegvideo.c, the malloc of default_mv_penalty, which
>> should be done only 1 time.
>> A malloc that is only done 1 time is not fatal.
> You're right!  But program, that runs in valgrind had more than
> twice in memory growth while running! And resulting bitrate is not
> equal to those, that was produced in real execution.

Running a program under valgrind always uses some extra memory.  The
overhead is lower if you use --tool=addrcheck instad of
--tool=memcheck.  Both will find memory leaks, but only the latter
(and slower) will detect use of uninitialized memory.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list