Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2589 closed defect (fixed)

ffv1 decoder membomb

Reported by: Clément Bœsch Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: ffv1 regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Generate a FFv1 sample:

% ./ffmpeg -f lavfi -i testsrc=d=300 -c:v ffv1 -y test.nut
ffmpeg version N-53267-g1de28cb Copyright (c) 2000-2013 the FFmpeg developers
  built on May 19 2013 12:29:47 with gcc 4.8.0 (GCC) 20130502 (prerelease)
  configuration: --enable-gpl --enable-version3 --enable-fontconfig --enable-libfreetype --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-x11grab --enable-libopenjpeg --enable-libass --enable-libmodplug --enable-libv4l2 --cc=colorgcc --samples=/home/ubitux/fate-samples --prefix=/tmp/ffinstall --disable-runtime-cpudetect --enable-libcelt --enable-libopencv --enable-frei0r --enable-libcaca --enable-libiec61883 --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-libopus --enable-libpulse --enable-libspeex --enable-libquvi --assert-level=2 --enable-libzmq
  libavutil      52. 33.100 / 52. 33.100
  libavcodec     55. 10.101 / 55. 10.101
  libavformat    55.  7.100 / 55.  7.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 68.101 /  3. 68.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, lavfi, from 'testsrc=d=300':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Output #0, nut, to 'test.nut':
  Metadata:
    encoder         : Lavf55.7.100
    Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), bgr0, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 51200 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> ffv1)
Press [q] to stop, [?] for help
frame= 7500 fps=175 q=-1.0 Lsize=   32327kB time=00:05:00.00 bitrate= 882.7kbits/s    
video:32281kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.142917%

Spawn a memory monitor, and try:

% ./ffmpeg -re -i test.nut -f null -
ffmpeg version N-53267-g1de28cb Copyright (c) 2000-2013 the FFmpeg developers
  built on May 19 2013 12:29:47 with gcc 4.8.0 (GCC) 20130502 (prerelease)
  configuration: --enable-gpl --enable-version3 --enable-fontconfig --enable-libfreetype --enable-libmp3lame --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-x11grab --enable-libopenjpeg --enable-libass --enable-libmodplug --enable-libv4l2 --cc=colorgcc --samples=/home/ubitux/fate-samples --prefix=/tmp/ffinstall --disable-runtime-cpudetect --enable-libcelt --enable-libopencv --enable-frei0r --enable-libcaca --enable-libiec61883 --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-libopus --enable-libpulse --enable-libspeex --enable-libquvi --assert-level=2 --enable-libzmq
  libavutil      52. 33.100 / 52. 33.100
  libavcodec     55. 10.101 / 55. 10.101
  libavformat    55.  7.100 / 55.  7.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 68.101 /  3. 68.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, nut, from 'test.nut':
  Metadata:
    encoder         : Lavf55.7.100
  Duration: 00:04:59.96, start: 0.000000, bitrate: 882 kb/s
    Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), bgr0, 320x240, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 51200 tbn, 51200 tbc
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf55.7.100
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (ffv1 -> rawvideo)
Press [q] to stop, [?] for help
[null @ 0x2fba060] Encoder did not produce proper pts, making some up.
frame=  554 fps= 25 q=0.0 Lsize=N/A time=00:00:22.16 bitrate=N/A

Memory will grow slowly and never reduce. Remove the -re and you'll membomb yourself in a few seconds.

This is a regression (not reproducible in 1.2), but I've not looked at which commit introduced the regression.

Change History (4)

comment:1 by Clément Bœsch, 11 years ago

Summary: ffv1 decoder membomnffv1 decoder membomb

comment:2 by Clément Bœsch, 11 years ago

Looks like a regression since a0c0900e470fde0d6db360e555620476c2323895.

comment:3 by Carl Eugen Hoyos, 11 years ago

Keywords: ffv1,regression → ffv1 regression
Reproduced by developer: set
Resolution: fixed
Status: newclosed

Fixed by Michael.

Note: See TracTickets for help on using tickets.