[FFmpeg-trac] #1244(avformat:open): ogg: vorbis_header() leaks memory allocated for packets in private data.

FFmpeg trac at avcodec.org
Tue Apr 24 08:17:43 CEST 2012


#1244: ogg: vorbis_header() leaks memory allocated for packets in private data.
------------------------------------+------------------------------------
             Reporter:  dalecurtis  |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  ogg leak    |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+------------------------------------
Changes (by cehoyos):

 * keywords:   => ogg leak
 * status:  new => open
 * reproduced:  0 => 1


Comment:

 {{{
 $ valgrind --leak-check=full ffmpeg_g -i wav.711.ogv
 ==14895== Memcheck, a memory error detector.
 ==14895== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
 ==14895== Using LibVEX rev 1732, a library for dynamic binary translation.
 ==14895== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
 ==14895== Using valgrind-3.2.3, a dynamic binary instrumentation
 framework.
 ==14895== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
 ==14895== For more details, rerun with: -v
 ==14895==
 ffmpeg version N-40092-g3bbf3f7 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Apr 24 2012 07:56:11 with gcc 4.3.2
   configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --disable-optimizations
   libavutil      51. 47.100 / 51. 47.100
   libavcodec     54. 15.100 / 54. 15.100
   libavformat    54.  3.100 / 54.  3.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 72.100 /  2. 72.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 11.100 /  0. 11.100
 [vorbis @ 0x4469de0] Extradata missing.
     Last message repeated 1 times
 [ogg @ 0x4416480] Could not find codec parameters (Unknown: none)
 Input #0, ogg, from 'wav.711.ogv':
   Duration: 00:00:00.09, start: 0.000000, bitrate: 603 kb/s
     Stream #0:0: Data: none
     Stream #0:1: Unknown: none
     Stream #0:2: Audio: vorbis, 8000 Hz, 1 channels, s16, 16 kb/s
 At least one output file must be specified
 ==14895==
 ==14895== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 1)
 ==14895== malloc/free: in use at exit: 30 bytes in 1 blocks.
 ==14895== malloc/free: 100 allocs, 99 frees, 814,825 bytes allocated.
 ==14895== For counts of detected errors, rerun with: -v
 ==14895== searching for pointers to 1 not-freed blocks.
 ==14895== checked 6,271,528 bytes.
 ==14895==
 ==14895== 30 bytes in 1 blocks are definitely lost in loss record 1 of 1
 ==14895==    at 0x4021A50: memalign (in
 /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
 ==14895==    by 0x4021AAA: posix_memalign (in
 /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
 ==14895==    by 0x8737E3E: av_malloc (mem.c:95)
 ==14895==    by 0x8737FB9: av_mallocz (mem.c:187)
 ==14895==    by 0x81619C1: vorbis_header (oggparsevorbis.c:225)
 ==14895==    by 0x815379B: ogg_packet (oggdec.c:394)
 ==14895==    by 0x8153A4D: ogg_get_headers (oggdec.c:461)
 ==14895==    by 0x8154069: ogg_read_header (oggdec.c:538)
 ==14895==    by 0x81B2DF6: avformat_open_input (utils.c:638)
 ==14895==    by 0x805A59A: opt_input_file (ffmpeg.c:4266)
 ==14895==    by 0x8061174: parse_option (cmdutils.c:303)
 ==14895==    by 0x80612BA: parse_options (cmdutils.c:336)
 ==14895==
 ==14895== LEAK SUMMARY:
 ==14895==    definitely lost: 30 bytes in 1 blocks.
 ==14895==      possibly lost: 0 bytes in 0 blocks.
 ==14895==    still reachable: 0 bytes in 0 blocks.
 ==14895==         suppressed: 0 bytes in 0 blocks.
 }}}
 {{{
 $ valgrind --leak-check=full ffmpeg_g -i wav.711.ogv -f null -
 ==15205== Memcheck, a memory error detector.
 ==15205== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
 ==15205== Using LibVEX rev 1732, a library for dynamic binary translation.
 ==15205== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
 ==15205== Using valgrind-3.2.3, a dynamic binary instrumentation
 framework.
 ==15205== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
 ==15205== For more details, rerun with: -v
 ==15205==
 ffmpeg version N-40092-g3bbf3f7 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Apr 24 2012 07:56:11 with gcc 4.3.2
   configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --disable-optimizations
   libavutil      51. 47.100 / 51. 47.100
   libavcodec     54. 15.100 / 54. 15.100
   libavformat    54.  3.100 / 54.  3.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 72.100 /  2. 72.100
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 11.100 /  0. 11.100
 [vorbis @ 0x4469de0] Extradata missing.
     Last message repeated 1 times
 [ogg @ 0x4416480] Could not find codec parameters (Unknown: none)
 Input #0, ogg, from 'wav.711.ogv':
   Duration: 00:00:00.09, start: 0.000000, bitrate: 603 kb/s
     Stream #0:0: Data: none
     Stream #0:1: Unknown: none
     Stream #0:2: Audio: vorbis, 8000 Hz, 1 channels, s16, 16 kb/s
 [vorbis @ 0x4469de0] Extradata missing.
 Output #0, null, to 'pipe:':
     Stream #0:0: Audio: pcm_s16le, 8000 Hz, 1 channels, s16, 128 kb/s
 Stream mapping:
   Stream #0:2 -> #0:0 (vorbis -> pcm_s16le)
 Error while opening decoder for input stream #0:2
 ==15205==
 ==15205== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 3 from 1)
 ==15205== malloc/free: in use at exit: 402 bytes in 3 blocks.
 ==15205== malloc/free: 136 allocs, 133 frees, 879,592 bytes allocated.
 ==15205== For counts of detected errors, rerun with: -v
 ==15205== searching for pointers to 3 not-freed blocks.
 ==15205== checked 6,271,560 bytes.
 ==15205==
 ==15205== 402 bytes in 3 blocks are definitely lost in loss record 1 of 1
 ==15205==    at 0x4021A50: memalign (in
 /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
 ==15205==    by 0x4021AAA: posix_memalign (in
 /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
 ==15205==    by 0x8737E3E: av_malloc (mem.c:95)
 ==15205==    by 0x8737FB9: av_mallocz (mem.c:187)
 ==15205==    by 0x81619C1: vorbis_header (oggparsevorbis.c:225)
 ==15205==    by 0x815379B: ogg_packet (oggdec.c:394)
 ==15205==    by 0x8153A4D: ogg_get_headers (oggdec.c:461)
 ==15205==    by 0x8154069: ogg_read_header (oggdec.c:538)
 ==15205==    by 0x81B2DF6: avformat_open_input (utils.c:638)
 ==15205==    by 0x805A59A: opt_input_file (ffmpeg.c:4266)
 ==15205==    by 0x8061174: parse_option (cmdutils.c:303)
 ==15205==    by 0x80612BA: parse_options (cmdutils.c:336)
 ==15205==
 ==15205== LEAK SUMMARY:
 ==15205==    definitely lost: 402 bytes in 3 blocks.
 ==15205==      possibly lost: 0 bytes in 0 blocks.
 ==15205==    still reachable: 0 bytes in 0 blocks.
 ==15205==         suppressed: 0 bytes in 0 blocks.
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1244#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list