[FFmpeg-devel] [BUG] ffmpeg crash on broken MPEG-1 file

Panagiotis Issaris takis.issaris
Fri Jun 1 17:29:08 CEST 2007


Hi,

When feeding a broken MPEG-1 file to ffmpeg it crashes:


213:~/build/ffmpeg takis$ gdb ./ffmpeg_g
GNU gdb 6.3.50-20050815 (Apple version gdb-573) (Fri Oct 20 15:50:43  
GMT 2006)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for  
shared libraries ... done

(gdb) r -i c.mpg d.mpg
Starting program: /Users/takis/build/ffmpeg/ffmpeg_g -i c.mpg d.mpg
Reading symbols for shared libraries .. done
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard,  
et al.
   configuration:
   libavutil version: 49.4.0
   libavcodec version: 51.40.4
   libavformat version: 51.12.1
   built on May 31 2007 17:41:03, gcc: 4.0.1 (Apple Computer, Inc.  
build 5367)
[mpeg1video @ 0x3d49c4]skipped MB in I frame at 3 1
[mpeg1video @ 0x3d49c4]skipped MB in I frame at 3 0
[mpeg1video @ 0x3d49c4]Warning MVs not available
[mpeg1video @ 0x3d49c4]concealing 300 DC, 300 AC, 300 MV errors

Seems stream 1 codec frame rate differs from container frame rate:  
inf (1/0) -> 90000.00 (90000/1)

Seems stream 2 codec frame rate differs from container frame rate:  
inf (1/0) -> 90000.00 (90000/1)

Seems stream 3 codec frame rate differs from container frame rate:  
inf (1/0) -> 90000.00 (90000/1)

Seems stream 4 codec frame rate differs from container frame rate:  
inf (1/0) -> nan (0/0)
Input #0, mpeg, from 'c.mpg':
   Duration: 22:01:52.4, start: 0.500000, bitrate: 0 kb/s
   Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 320x240, 104857 kb/ 
s, 29.97 fps(r)
   Stream #0.1[0x1e4]: Video: mpeg2video, 90000.00 fps(r)
   Stream #0.2[0x1e1]: Video: mpeg2video, 90000.00 fps(r)
   Stream #0.3[0x1e8]: Video: mpeg2video, 90000.00 fps(r)
   Stream #0.4[0x1e2]: Video: mpeg2video,   inf fps(c)

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x000035b3 in new_video_stream (oc=0x0) at /Users/takis/src/ffmpeg/ 
ffmpeg.c:2768
2768                video_enc->time_base.den= best->num;
(gdb)

I uploaded the sample to incoming.mplayerhq.hu/MPlayer/incoming/c.mpg

Oh yes, the crash occurred on MacOS/X using GCC 4.0.1.

With friendly regards,
Takis

PS: Marc, the sample was generated using zzuf :)




More information about the ffmpeg-devel mailing list