[FFmpeg-trac] #1931(avformat:open): ogg: ogg_read_header() leaks memory on failure.

FFmpeg trac at avcodec.org
Tue Nov 20 02:15:33 CET 2012


#1931: ogg: ogg_read_header() leaks memory on failure.
------------------------------------+------------------------------------
             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):

 * status:  new => open
 * version:  unspecified => git-master
 * component:  undetermined => avformat
 * reproduced:  0 => 1


Comment:

 {{{
 $ valgrind --leak-check=full ffmpeg_g -i 116927.ogv
 ==11205== Memcheck, a memory error detector
 ==11205== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
 ==11205== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright
 info
 ==11205== Command: ffmpeg_g -i 116927.ogv
 ==11205==
 ffmpeg version N-46903-ged27ed9 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Nov 20 2012 01:43:50 with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --disable-indev=jack
   libavutil      52.  8.100 / 52.  8.100
   libavcodec     54. 73.100 / 54. 73.100
   libavformat    54. 37.100 / 54. 37.100
   libavdevice    54.  3.100 / 54.  3.100
   libavfilter     3. 23.101 /  3. 23.101
   libswscale      2.  1.102 /  2.  1.102
   libswresample   0. 17.100 /  0. 17.100
   libpostproc    52.  2.100 / 52.  2.100
 [ogg @ 0x66b2c80] Codec not found
 [ogg @ 0x66b2c80] Changing stream parameters in multistream ogg is not
 implemented. Update your FFmpeg version to the newest one from Git. If the
 problem still occurs, it means that your file has a feature which has not
 been implemented.
 [ogg @ 0x66b2c80] failed to create or replace stream
 116927.ogv: Not yet implemented in FFmpeg, patches welcome
 ==11205==
 ==11205== HEAP SUMMARY:
 ==11205==     in use at exit: 197,205 bytes in 5 blocks
 ==11205==   total heap usage: 38 allocs, 33 frees, 384,836 bytes allocated
 ==11205==
 ==11205== 197,205 (1,224 direct, 195,981 indirect) bytes in 1 blocks are
 definitely lost in loss record 3 of 3
 ==11205==    at 0x4C2ACCE: realloc (in /usr/lib64/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==11205==    by 0x54D85F: ogg_read_page (oggdec.c:216)
 ==11205==    by 0x54DAF4: ogg_packet (oggdec.c:413)
 ==11205==    by 0x54E9A0: ogg_read_header (oggdec.c:598)
 ==11205==    by 0x5958EE: avformat_open_input (utils.c:595)
 ==11205==    by 0x456A6C: opt_input_file (ffmpeg_opt.c:779)
 ==11205==    by 0x4645EF: parse_option (cmdutils.c:324)
 ==11205==    by 0x4649C7: parse_options (cmdutils.c:357)
 ==11205==    by 0x4507CF: main (ffmpeg.c:3140)
 ==11205==
 ==11205== LEAK SUMMARY:
 ==11205==    definitely lost: 1,224 bytes in 1 blocks
 ==11205==    indirectly lost: 195,981 bytes in 4 blocks
 ==11205==      possibly lost: 0 bytes in 0 blocks
 ==11205==    still reachable: 0 bytes in 0 blocks
 ==11205==         suppressed: 0 bytes in 0 blocks
 ==11205==
 ==11205== For counts of detected and suppressed errors, rerun with: -v
 ==11205== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)
 }}}

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


More information about the FFmpeg-trac mailing list