[Libav-user] Closing codec properly after an audio decoding

Polochon Street polochonstreet at gmx.fr
Sat Aug 29 20:40:28 CEST 2015


Okay, so I compiled ffmpeg with those flags:
/configure            \
     --prefix=/usr        \
     --shlibdir=/usr/lib  \
     --disable-static \
     --enable-debug=3 \
     --disable-optimizations \
     --disable-stripping \
     --enable-gpl         \
     --enable-gnutls      \
     --enable-libass      \
     --enable-libfdk-aac  \
     --enable-libfreetype \
     --enable-libmp3lame  \
     --enable-libopus     \
     --enable-libtheora   \
     --enable-libvorbis   \
     --enable-libvpx      \
     --enable-libx264     \
     --enable-libx265     \
     --enable-nonfree     \
     --enable-shared      \
     --enable-x11grab     \
And I cmake'd my program with -DCMAKE_BUILD_TYPE=Debug 
-DCMAKE_C_FLAGS=-fsanitize=address, but I still only have this debug trace:

==17320==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 664 byte(s) in 2 object(s) allocated from:
     #0 0x7f5aaf43e386 in __interceptor_posix_memalign 
/build/gcc-multilib/src/gcc-5.2.0/libsanitizer/asan/asan_malloc_linux.cc:105
     #1 0x7f5aaea93b0f in av_malloc (/usr/lib/libavutil.so.54+0x1db0f)

Indirect leak of 4769 byte(s) in 2 object(s) allocated from:
     #0 0x7f5aaf43e386 in __interceptor_posix_memalign 
/build/gcc-multilib/src/gcc-5.2.0/libsanitizer/asan/asan_malloc_linux.cc:105
     #1 0x7f5aaea93b0f in av_malloc (/usr/lib/libavutil.so.54+0x1db0f)

SUMMARY: AddressSanitizer: 5433 byte(s) leaked in 4 allocation(s).

The 29/08/2015 17:10, Carl Eugen Hoyos wrote:
> //First step (that is practically always sufficient)
> is to find out where exactly (!) the memory was
> allocated: We all know that it was inside mem.c
> but the important question is what called
> av_malloc().
> Either use a static binary or use
> --disable-stripping for a useful debug build.
>
> Carl Eugen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150829/3c43393a/attachment.html>


More information about the Libav-user mailing list