[FFmpeg-cvslog] r23933 - trunk/libavcodec/mpegvideo.c

Martin Storsjö martin
Fri Jul 2 08:50:37 CEST 2010


On Thu, 1 Jul 2010, M?ns Rullg?rd wrote:

> Martin Storsj? <martin at martin.st> writes:
> 
> > On Thu, 1 Jul 2010, mru wrote:
> >
> >> Author: mru
> >> Date: Thu Jul  1 13:51:01 2010
> >> New Revision: 23933
> >> 
> >> Log:
> >> Maybe fix threaded mpeg*video encoding
> >> 
> >> This allocates per-thread copies of some MpegEncContext.ac_val which
> >> is used concurrently from the encoding threads.
> >
> > This causes memory leaks when doing a normal (non-threaded?) encode.
> 
> I hope not.

Well, doing a simple encode like this, for example,

./ffmpeg -i http://samples.mplayerhq.hu/FLV/flash_video_5/i_004.flv test.mp4

results in these valgrind leak reports:

==892== 162,912 bytes in 1 blocks are possibly lost in loss record 1 of 1
==892==    at 0x4023E5E: memalign (vg_replace_malloc.c:532)
==892==    by 0x4023EBB: posix_memalign (vg_replace_malloc.c:660)
==892==    by 0x85274F5: av_mallocz (mem.c:83)
==892==    by 0x805CD84: MPV_common_init (mpegvideo.c:625)
==892==    by 0x805E255: MPV_encode_init (mpegvideo_enc.c:690)
==892==    by 0x805A6FC: encode_init (mpeg4videoenc.c:1247)
==892==    by 0x83734D8: avcodec_open (utils.c:516)
==892==    by 0x807C791: T.674 (ffmpeg.c:2339)
==892==    by 0x807EB0A: main (ffmpeg.c:4355)
==892== 
==892== LEAK SUMMARY:
==892==    definitely lost: 0 bytes in 0 blocks
==892==    indirectly lost: 0 bytes in 0 blocks
==892==      possibly lost: 162,912 bytes in 1 blocks
==892==    still reachable: 0 bytes in 0 blocks
==892==         suppressed: 0 bytes in 0 blocks

// Martin



More information about the ffmpeg-cvslog mailing list