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

FFmpeg trac at avcodec.org
Tue Dec 3 17:07:09 CET 2013


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

 I've found valgrind leak when making and running valgrind on
 examples/decoding_encoding from latest 2.1 branch.
 A small example is in doc/example , called decoding_encoding

 Leak summary:

 ==22764== 56 bytes in 1 blocks are possibly lost in loss record 1 of 1
 ==22764==    at 0x402BE68: malloc (in
 /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
 ==22764==    by 0x85753B0: av_malloc (in
 /usr/ffmpeg/build/LibFFMPEG/ffmpeg-2.1/doc/examples/decoding_encoding)
 ==22764==    by 0x807A353: video_decode_example (decoding_encoding.c:107)
 ==22764==    by 0x807A3FF: main (decoding_encoding.c:174)

 Actually, I have the same issue in my big application. I switched from 0.8
 branch to 2.1 branch, changed API and most of the files decoded fine.
 However, I am working on a valgrind leak summary always in the same place
 for all codecs (actually it is start of decoder allocation). Why does it
 happening ? What I am doing wrong ? Could you help me with this issue ?

 How to reproduce:
 make 2.1 branch with or anything else , I tried many different
 configurations
  ./configure --prefix="/usr/ffmpeg/build/LibFFMPEG" --extra-
 ldflags="-L/usr/ffmpeg/build/LibFFMPEG/lib"
 --bindir="/usr/ffmpeg/build/LibFFMPEG/bin" --enable-pthreads --extra-
 libs="-ldl" --extra-cflags="-I/usr/ffmpeg/build/LibFFMPEG/include"
 --enable-nonfree --enable-gpl --disable-vaapi --disable-debug --disable-
 iconv --disable-doc --disable-encoders --enable-memalign-hack'

 2. make examples from doc/examples
 3 run valgrind --tool=memcheck --leak-check=full --show-reachable=yes
 --verbose --track-origins=yes ./decoding_encoding <example> <example>

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


More information about the FFmpeg-trac mailing list