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

Michael Niedermayer michaelni
Sat Jun 2 18:02:08 CEST 2007


Hi

On Fri, Jun 01, 2007 at 05:29:08PM +0200, Panagiotis Issaris wrote:
> 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

problem is that additional streams get added in av_estimate_timings()
while the various things like r_frame_rate have been initalized before
that so the extra streams have a nonsense 0/0 timebase which confuses the
code

fix av_find_stream_info() so it doesnt return uninitalized streams if you
care about this one enough ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070602/c3ba2478/attachment.pgp>



More information about the ffmpeg-devel mailing list