Jeff Downs <[email protected]> added the comment:

New patch attached.
Implements a few fixes for dv-in-avi.
1. Add nb_avi_streams to count actual avi streams; normally same as nb_streams,
but set to 1 for dv-in-avi.  Stream enumerations for internal avi operations
work based off this now so they don't try to operate on the dv sub-streams (and
subsequently crash in the place noted in this issue, issue 1220, and other
places in the demux that could similarly crash).
2. When reading, don't bother with the non-interlacing seek code block for
sources with only one stream. This also means don't bother with it for
dv-in-avi, which is significant here because it addresses the "endless decode"
mentioned by banan -- dv-in-avi doesn't update the necessary internal state for
the non-interlacing seek code to work properly. It endlessly seeks back to, and
decodes from, the beginning of the file.
3. Once dv has been found and dv demux opened, don't try to process other
streams if other stream headers are found -- the demux doesn't handle this
properly (and it isn't allowed in type 1 dv-in-avi spec anyway afaik) and it
will lead to undefined state.

Both this issue's samples and that from issue 1220 decode fine with this.
Regression tests pass.

____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue666>
____________________________________________________

Attachment: 666-1220-dvavi.patch
Description: Binary data

Reply via email to