[FFmpeg-trac] #1900(avcodec:open): h264: huge memory allocation and a memleak

FFmpeg trac at avcodec.org
Fri Nov 16 00:02:15 CET 2012


#1900: h264: huge memory allocation and a memleak
------------------------------------+-----------------------------------
             Reporter:  ami_stuff   |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:
             Keywords:  h264 leak   |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+-----------------------------------

Comment (by ami_stuff):

 these two, but they are not mine, so no debug symbols

 {{{
 C:\>ffmpeg1
 ffmpeg version N-46726-g2f74f8d Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Nov 13 2012 19:29:51 with gcc 4.7.2 (GCC)
   configuration: --enable-gpl --enable-version3 --disable-pthreads
 --enable-runt
 ime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-
 libass -
 -enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype
 --enab
 le-libgsm --enable-libmp3lame --enable-libnut --enable-libopenjpeg
 --enable-libo
 pus --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-
 libtheo
 ra --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
 --enable-li
 bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
 --ena
 ble-zlib
   libavutil      52.  6.100 / 52.  6.100
   libavcodec     54. 71.100 / 54. 71.100
   libavformat    54. 36.100 / 54. 36.100
   libavdevice    54.  3.100 / 54.  3.100
   libavfilter     3. 23.100 /  3. 23.100
   libswscale      2.  1.102 /  2.  1.102
   libswresample   0. 16.100 /  0. 16.100
   libpostproc    52.  1.100 / 52.  1.100
 Hyper fast Audio and Video encoder
 usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]
 outfi
 le}...

 Use -h to get full help or, even better, run 'man ffmpeg'
 }}}


 {{{
 C:\>ffmpeg2
 ffmpeg version N-46755-ge70144c Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Nov 15 2012 02:38:20 with gcc 4.5.0 (GCC) 20100414 (Fedora
 MinGW 4.5.
 0-1.fc14)
   configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build
 --arch=
 x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686
 -pc-min
 gw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-
 cpudetect
 --enable-cross-compile --enable-static --disable-shared --extra-
 libs='-lws2_32 -
 lwinmm -lpthread' --extra-cflags='--static
 -I/var/www/users/research/ffmpeg/snap
 shots/build/include' --extra-ldflags='-static
 -L/var/www/users/research/ffmpeg/s
 napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-
 version3
 --enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora
 --enable-
 libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb
 --enable-
 libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-
 decoder=libvpx
   libavutil      52.  6.100 / 52.  6.100
   libavcodec     54. 71.100 / 54. 71.100
   libavformat    54. 36.100 / 54. 36.100
   libavdevice    54.  3.100 / 54.  3.100
   libavfilter     3. 23.100 /  3. 23.100
   libswscale      2.  1.102 /  2.  1.102
   libswresample   0. 16.100 /  0. 16.100
   libpostproc    52.  1.100 / 52.  1.100
 Hyper fast Audio and Video encoder
 usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options]
 outfi
 le}...

 Use -h to get full help or, even better, run 'man ffmpeg'
 }}}


 {{{
 (gdb) r -cpuflags 0 -i h264.avi
 The program being debugged has been started already.
 Start it from the beginning? (y or n) y

 Starting program: d:\mingw\msys\1.0\ffmpeg-head-b2b67fd\ffmpeg2.exe
 -cpuflags 0
 -i h264.avi
 [New Thread 5140.0x17a8]
 ffmpeg version N-46755-ge70144c Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Nov 15 2012 02:38:20 with gcc 4.5.0 (GCC) 20100414 (Fedora
 MinGW 4.5.
 0-1.fc14)
   configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build
 --arch=
 x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686
 -pc-min
 gw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-
 cpudetect
 --enable-cross-compile --enable-static --disable-shared --extra-
 libs='-lws2_32 -
 lwinmm -lpthread' --extra-cflags='--static
 -I/var/www/users/research/ffmpeg/snap
 shots/build/include' --extra-ldflags='-static
 -L/var/www/users/research/ffmpeg/s
 napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-
 version3
 --enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora
 --enable-
 libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb
 --enable-
 libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-
 decoder=libvpx
   libavutil      52.  6.100 / 52.  6.100
   libavcodec     54. 71.100 / 54. 71.100
   libavformat    54. 36.100 / 54. 36.100
   libavdevice    54.  3.100 / 54.  3.100
   libavfilter     3. 23.100 /  3. 23.100
   libswscale      2.  1.102 /  2.  1.102
   libswresample   0. 16.100 /  0. 16.100
   libpostproc    52.  1.100 / 52.  1.100
 [h264 @ 0x1edce80] missing picture in access unit with size 1941
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 2377
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 2090
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 2305
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 3280
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 2963
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 2624
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] illegal log2_max_frame_num 50
 [h264 @ 0x1edce80] missing picture in access unit with size 2937
 [h264 @ 0x1edce80] illegal log2_max_frame_num 50
     Last message repeated 1 times
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] sps_id out of range
 [h264 @ 0x1edce80] missing picture in access unit with size 4221
 [h264 @ 0x1edce80] sps_id out of range
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 3 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 4270
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 3875
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] slice type too large (2) at 0 0
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] sps_id out of range
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 4394
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 4743
 [h264 @ 0x1edce80] Partitioned H.264 support is incomplete
 [h264 @ 0x1edce80] missing picture in access unit with size 5338
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 6106
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] sps_id (32) out of range
 [h264 @ 0x1edce80] missing picture in access unit with size 5938
 [h264 @ 0x1edce80] sps_id (32) out of range
     Last message repeated 1 times
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 5345
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 1 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] too many reference frames
     Last message repeated 1 times
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] sps_id out of range
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 5498
 [h264 @ 0x1edce80] Partitioned H.264 support is incomplete
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 10 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] Partitioned H.264 support is incomplete
 [h264 @ 0x1edce80] sps_id out of range
 [h264 @ 0x1edce80] missing picture in access unit with size 5630
 [h264 @ 0x1edce80] sps_id out of range
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 5714
 [h264 @ 0x1edce80] non-existing PPS 2 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] sps_id out of range
     Last message repeated 1 times
 [h264 @ 0x1edce80] missing picture in access unit with size 5525
 [h264 @ 0x1edce80] sps_id out of range
     Last message repeated 1 times
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] slice type too large (2) at 0 0
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] missing picture in access unit with size 5623
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] FMO not supported
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] FMO not supported
 [h264 @ 0x1edce80] non-existing PPS 227 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] Cannot allocate memory.
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] sps_id out of range
 [h264 @ 0x1edce80] concealing 297024 DC, 297024 AC, 297024 MV errors in P
 frame
 [h264 @ 0x1edce80] guess_dc() is out of memory
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] illegal POC type 7
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] illegal POC type 7
     Last message repeated 1 times
 [h264 @ 0x1edce80] slice type too large (3) at 0 0
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] non-existing PPS 3 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] non-existing PPS 6 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 13 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] non-existing PPS 10 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] Partitioned H.264 support is incomplete
 [h264 @ 0x1edce80] missing picture in access unit with size 5668
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] sps_id (32) out of range
 [h264 @ 0x1edce80] missing picture in access unit with size 5753
 [h264 @ 0x1edce80] sps_id (32) out of range
     Last message repeated 1 times
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 5903
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 6 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] non-existing PPS referenced
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] non-existing PPS 0 referenced
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] missing picture in access unit with size 5680
 [h264 @ 0x1edce80] no frame!
 [h264 @ 0x1edce80] Missing reference picture, default is 2
     Last message repeated 1 times
 [h264 @ 0x1edce80] deblocking filter parameters 52 106 out of range
 [h264 @ 0x1edce80] decode_slice_header error
 [h264 @ 0x1edce80] Warning MVs not available
 [h264 @ 0x1edce80] concealing 297024 DC, 297024 AC, 297024 MV errors in P
 frame

 Program received signal SIGSEGV, Segmentation fault.
 0x0090a710 in ?? ()
 }}}

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


More information about the FFmpeg-trac mailing list