Benjamin Larsson <[email protected]> added the comment:
When dv_produce_packet/dv_extract_audio_info adds a stream for the pcm track it
doesn't add a priv_data context. Thus when the code around row 672 in avidec is
called there is no context to use when stream [1] is used. The attached patch
makes sure that stream [1] isn't used. But the file is encoded forever so this
isn't a real fix. VLC and Totem is able to play some more frames then what
FFmpeg/ffplay is able to.
____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue666>
____________________________________________________
Index: libavformat/avidec.c
===================================================================
--- libavformat/avidec.c (revision 17516)
+++ libavformat/avidec.c (working copy)
@@ -667,8 +667,9 @@
AVIStream *best_ast;
int64_t best_ts= INT64_MAX;
int i;
+ int nb_streams_tmp = avi->dv_demux ? 1 : s->nb_streams;
- for(i=0; i<s->nb_streams; i++){
+ for(i=0; i<nb_streams_tmp; i++){
AVStream *st = s->streams[i];
AVIStream *ast = st->priv_data;
int64_t ts= ast->frame_offset;