[Ffmpeg-devel] mov files cause sigfpe

Måns Rullgård mru
Tue Sep 6 23:47:46 CEST 2005

Revision 1.86 of mov.c causes a divide by zero in
av_find_stream_info() when opening many files:

$ ~/src/ffmpeg/build-vanilla/ffmpeg -i NeroAVC.mp4 
ffmpeg version CVS, build 3211520, Copyright (c) 2000-2004 Fabrice Bellard
  built on Sep  6 2005 21:48:41, gcc: 3.3.5-20050130 (Gentoo Linux, ssp-, pie-
Floating point exception (core dumped)
$ gdb ~/src/ffmpeg/build-vanilla/ffmpeg /scratch/core/ffmpeg.3658 
(gdb) bt
#0  0x08313be0 in __divdi3 (u=0, v=0)
    at /var/portage/tmp/portage/gcc-
#1  0x08312773 in av_rescale_q (a=0, bq={num = 0, den = 0}, cq=
      {num = 1, den = 1000000})
    at /home/mru/src/ffmpeg/vanilla/libavutil/mathematics.c:64
#2  0x08060bda in av_find_stream_info (ic=0x83ef0a0)
    at /home/mru/src/ffmpeg/vanilla/libavformat/utils.c:2002
#3  0x08058ed9 in opt_input_file (filename=0xbfffe8c5 "NeroAVC.mp4")
    at /home/mru/src/ffmpeg/vanilla/ffmpeg.c:3056
#4  0x0805ed89 in parse_options (argc=3, argv=0xbfffe6d4, options=0x8315540)
    at /home/mru/src/ffmpeg/vanilla/cmdutils.c:89
#5  0x08054870 in main (argc=3, argv=0x1)
    at /home/mru/src/ffmpeg/vanilla/ffmpeg.c:4506

The old computation of time_base is obviously flawed, but now it
doesn't get set at all.  I'm not really sure what the proper way to
fix this is.

The NeroAVC.mp4 file is available from

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list