[Ffmpeg-devel] [BUG] MPEG 2 Division By Zero

Brian Brice bbrice
Tue Oct 31 20:23:22 CET 2006


Brian Brice wrote:
> M?ns Rullg?rd wrote:
>> Brian Brice <bbrice at newtek.com> writes:
>>
>>> Hello.
>>>
>>> Something quite strange is happening when I'm encoding MPEG 2.  I'm
>>> encoding clips that are just noise and I get "division by 0" crashes.
>>> Unforunately, I can't produce a call stack (using DLLs in Windows from
>>> VC++), but I did narrow down where the division is occurring:
>>
>> Upload a sample and tell us an FFmpeg command line that reproduces the
>> error.
>>
> 
> Unfortunately I'm not using the command line. :-(
> I am linking to the DLLs produced by mingw/gcc from within Visual
> Studio.  And I know it's not a VS problem (so don't bash, please?),
> because this stuff has worked before.  I am programmatically generating
> frames of noise and throwing them at the encoder.  I set only certain
> members of AVCodecContext (as mentioned in the first email), and leave
> the rest to default.
> 

Sorry, I spoke too soon.  Right after I sent that message, I tried
making an uncompressed AVI with this noise then using ffmpeg on the
command line to reproduce.

I uploaded a sample to /MPlayer/incoming/VictoriasNoise

Here is a log of the execution:

pollux:~> ./ffmpeg -i VictoriasNoise.avi -f mpeg2video -vcodec 
mpeg2video -b 18300k -minrate 18300k -maxrate 18300k -bufsize 448K -bf 2 
-an out.m2v
FFmpeg version SVN-r6847, Copyright (c) 2000-2006 Fabrice Bellard, et al.
   configuration:  --enable-mingw32 --disable-static --enable-shared 
--enable-memalign-hack --disable-strip --enable-mp3lame --enable-faac 
--disable-demuxer=gxf 
--extra-cflags=-I/home/bbrice/lame-3.96.1-bin/include 
-I/home/bbrice/faac-1.25-bin/include 
--extra-ldflags=-L/home/bbrice/lame-3.96.1-bin/lib 
-L/home/bbrice/faac-1.25-bin/lib 
--prefix=/home/bbrice/ffmpeg-20061030-bin 
--incdir=/home/bbrice/ffmpeg-20061030-bin/include
   libavutil version: 49.0.2
   libavcodec version: 51.23.0
   libavformat version: 50.6.0
   built on Oct 30 2006 23:12:04, gcc: 3.4.2 (mingw-special)
Input #0, avi, from 'VictoriasNoise.avi':
   Duration: 00:00:00.1, start: 0.000000, bitrate: 670869 kb/s
   Stream #0.0: Video: rawvideo, bgr24, 1280x720, 29.97 fps(r)
   Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Output #0, mpeg2video, to 'out.m2v':
   Stream #0.0: Video: mpeg2video, yuv420p, 1280x720, q=2-31, 18300 
kb/s, 29.97 fps(c)
Stream mapping:
   Stream #0.0 -> #0.0
[mpeg2video @ 0076A000]rc buffer underflow
[mpeg2video @ 0076A000]rc buffer underflow

-- 
Brian Brice




More information about the ffmpeg-devel mailing list