[FFmpeg-devel] Infinite loop demuxing avi file

Nigel Touati-Evans nigel.touatievans
Thu Oct 22 13:45:00 CEST 2009


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.

Nigel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 759 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091022/e3759881/attachment.obj>



More information about the ffmpeg-devel mailing list