[FFmpeg-trac] #3194(avcodec:new): valgrind leak on example package

FFmpeg trac at avcodec.org
Tue Dec 10 11:39:56 CET 2013

#3194: valgrind  leak on example package
             Reporter:  andreyv     |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:
             Keywords:  leak        |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |

Comment (by andreyv):

 I've tested with suggested arguments. However , it doesn't help to fix the

 ./configure --prefix=/home/andrey/ffmpeg_sources/ffmpeg_latest --extra-
 --bindir=/home/andrey/ffmpeg_build/bin --extra-libs=-ldl --extra-
 cflags=-I/home/andrey/ffmpeg_build/include --enable-gpl --disable-vaapi

 ==6788== 24 bytes in 1 blocks are still reachable in loss record 1 of 1
 ==6788==    at 0x402A420: memalign (in
 ==6788==    by 0x402A4DE: posix_memalign (in
 ==6788==    by 0x86816A7: av_malloc (mem.c:94)
 ==6788==    by 0x808CB22: video_decode_example (decoding_encoding.c:557)
 ==6788==    by 0x808CC3B: main (decoding_encoding.c:635)

 line 557 is
     if (avcodec_open2(c, codec, NULL) < 0) {
         fprintf(stderr, "Could not open codec\n");
 the leak comes from the av_malloc, it is inside the allocation from

Ticket URL: <https://trac.ffmpeg.org/ticket/3194#comment:7>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list