[Ffmpeg-devel] [PATCH] nutdec: fix infinite loop when resyncing

Oded Shimon ods15
Thu Mar 1 18:12:53 CET 2007


On Wed, Feb 28, 2007 at 10:06:12AM +0100, Michael Niedermayer wrote:
> Hi
> 
> On Wed, Feb 28, 2007 at 09:22:16AM +0100, Clemens Ladisch wrote:
> > Michael Niedermayer wrote:
> > > On Tue, Feb 27, 2007 at 06:13:40PM +0100, Clemens Ladisch wrote:
> > > > When nut_read_packet() tries to resync after an error, it restarts
> > > > decoding at the next startcode after the last syncpoint.  When there was
> > > > another packet between that syncpoint and the error position, the error
> > > > position will eventually be reached again and nut_read_packet() will
> > > > loop forever.
> > > > 
> > > > This can be fixed by syncing only to syncpoints.
> > > 
> > > or starting from the last startcode, which may loose less before the 
> > > next syncpoint starcode
> > 
> > This wouldn't make any difference; there must be a syncpoint after other
> > headers.
> 
> unless its damaged though i guess this is a little unlikely, so well
> i am ok with the patch

In that case it wouldn't matter anyway, you would stop right after the 
headers and look for a syncpoint again (in fact, better off you don't 
attempt demuxing the obviously invalid data...)

- ods15




More information about the ffmpeg-devel mailing list