1 Jan 2011 05:24
[issue2470] ffmpeg crashes on y4m with invalid header
Daniel Kang <issues <at> roundup.ffmpeg.org>
2011-01-01 04:24:00 GMT
2011-01-01 04:24:00 GMT
New submission from Daniel Kang <daniel.d.kang <at> gmail.com>:
ffmpeg crashes with the error "Stream #0.0Floating point exception" for y4m
files with invalid frame rates that aren't both 0, with the arguments "ffmpeg -i
../y4m_invalid_header_crash_small.y4m test.mkv". The file was generated with
zzuf and foreman. The gdb run is below.
The error is caused by division by zero. This happens because ffmpeg reads in
the invalid header, but keeps the frame rate 0/0. I have attached a patch for
the function yuv4_read_header in libavformat/yuv4mpeg.c to better check for
invalid frame rates. Upon compiling and testing, the output is:
./ffmpeg -i ../y4m_invalid_header_crash_small.y4m test.mkv
FFmpeg version git-7285124, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 31 2010 23:19:50 with gcc 4.4.5
configuration: --enable-gpl --samples=../fate/fate-suite/
libavutil 50.36. 0 / 50.36. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.101. 0 / 52.101. 0
libavformat 52.91. 0 / 52.91. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.72. 0 / 1.72. 0
libswscale 0.12. 0 / 0.12. 0
[yuv4mpegpipe <at> 0x11f9510] Estimating duration from bitrate, this may be inaccurate
Input #0, yuv4mpegpipe, from '../y4m_invalid_header_crash_small.y4m':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: rawvideo, yuv420p, 352x288, PAR 128:117 DAR 1408:1053,
25 tbr, 25 tbn, 25 tbc
[buffer <at> 0x1201e60] w:352 h:288 pixfmt:yuv420p
(Continue reading)
RSS Feed