[Ffmpeg-devel] [BUG] H.264 crash

Dennis van Amerongen Dennis.vanAmerongen
Sat Feb 11 22:24:43 CET 2006

>Diego Biurrun said:
>> On Wed, Jan 18, 2006 at 09:57:57PM +0100, Diego Biurrun wrote:
>>> I have a sample here that makes the H.264 decoder (MPlayer, MPlayer 
>>> with lavf demuxer, xine, vlc, ffplay) crash with the following
>>> [h264 @ 0x106463c8]reference picture missing during reorder
>>> [h264 @ 0x106463c8]reference picture missing during reorder
>>> [h264 @ 0x106463c8]reference picture missing during reorder
>>> mplayer: h264.c:2610: mc_dir_part: Assertion `pic->data[0]' failed.
>>> Get the sample from here:
>>> ftp://sandman.homedns.org/diego/ffmpeg/killbillclip.avi
>>> The crash happens both on my G4 (Debian unstable, gcc 4.0.3) and on 
>>> my K6 (Debian stable, gcc 2.95.4), so it's not platform dependent.
>>> The sample may very well be a broken bitstream, but a crash is bad 
>>> nevertheless.  If you need the backtrace I'll gladly provide it.
>> Loren confirmed this to be due to broken bitstream.  Not crashing 
>> would nevertheless be good.
>Crashes like that happen whever a reference picture is missing.  In a
correct bitstream this should obviously never happen.  However, in
sitations where packet loss is likely (UDP, DVB, etc.), pictures will be
missing, and crashing is totally unacceptable.  It also makes seeking in
index-less files practically impossible.
>A long time ago, before lavc supported H.264 with B-frames, this did
not cause a crash, only producing a few garbled
frames like the other codecs do.  Is there something that makes it
particularly difficult to fix this problem?

Inserting an if (!pic->data[0]) return; before assert(pic->data[0]); in
line 2610 in h264.c does fix both crash issues for the goro and
killbillclip samples referred to but I'm not sure if this is the right
approach because crash problems still exists for me in udp and tcp like



More information about the ffmpeg-devel mailing list