[Ffmpeg-devel] [PATCH] Fix crush when truncated slice passed to H.264 decoder

Dominik 'Rathann' Mierzejewski dominik
Tue Dec 5 22:29:37 CET 2006


On Tuesday, 05 December 2006 at 21:08, Michael Niedermayer wrote:
> Hi
> 
> On Tue, Dec 05, 2006 at 09:26:38PM +0300, Alexander Chemeris wrote:
> > Hello all,
> > 
> > This patch corrects FFMpeg's behaviour in case where H.264 slice
> > come to decoder truncated. This may occure when you receive
> > video stream from net and could not use big buffer on input to conceal
> > network jitter. It is common case for video telephony over Internet.
> > 
> > At svn rev 7225 FFMpeg often crashes when you pass incomplete slice
> > to decoder. You could reproduce this with attached H.264 frame and
> > ffmpeg executable:
> > 
> > % ffmpeg -f h264 -i crash.h264
> > 
> > The cause of this crash is decoder continue reading from stream, even
> > if no more data is available. In this case get_vlc2() seems to return -1,
> > so I add sheck for negative return result when total_coeff is read from 
> > stream.
> > It would be better to check every return result, but this will slow
> > down decoding.
> > Though some other values are checked, and it seems frequent crashes go
> > away with this fix. If more crashes will arise on bigger array of
> > tests, I'll report
> > them.
> 
> patch looks ok

Except is it has DOS line endings.

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan




More information about the ffmpeg-devel mailing list