[FFmpeg-devel] Infinite loop demuxing avi file

Michael Niedermayer michaelni
Thu Oct 22 20:44:05 CEST 2009


On Thu, Oct 22, 2009 at 12:45:00PM +0100, Nigel Touati-Evans wrote:
> I've got an avi file which causes the demuxer to get into an infinite
> loop. The problem seems to be that the final audio chunk has a size of
> 0 in the index, and so it keeps re-reading this packet.
> 
> I've made a patch (attached) for avidec.c which fixes the behaviour
> (in fact two changes, one of which fixes it in a nice way when the
> zero length chunk is at the end, as it is in my example, without
> affecting other streams, and another which will definitely exit if it
> would get into an infinite loop due a zero length chunk elsewhere, but
> I don't know if this is possible).
> 
> I'm not sure if this is the right way to go about it, or if both
> changes are needed - maybe these index entries shouldn't be added in
> the first place, but I haven't looked at this code at all.

Ive fixed this differently, can you confirm that my fix fixes
your file? or provide that file ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091022/8e826a2b/attachment.pgp>



More information about the ffmpeg-devel mailing list