[FFmpeg-devel] Infinite loop demuxing avi file
Fri Oct 23 11:01:32 CEST 2009
2009/10/22 Michael Niedermayer <michaelni at gmx.at>:
> 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 ...
Yes, thanks, this fixes it too. I had a feeling once I'd written my
patch that it was the wrong way to do it.
More information about the ffmpeg-devel