avformat/avidec: fix handling dv in avi
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 21 Nov 2014 02:08:20 +0000 (03:08 +0100)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Fri, 21 Nov 2014 08:30:59 +0000 (09:30 +0100)
Fixes Ticket4086

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f0ae0354d3f04c369257c2a28557524d28c5df15)

libavformat/avidec.c

index 5b260e2..a73bf98 100644 (file)
@@ -1141,7 +1141,7 @@ start_sync:
             goto start_sync;
         }
 
-        n = avi->dv_demux ? 0 : get_stream_idx(d);
+        n = get_stream_idx(d);
 
         if (!((i - avi->last_pkt_pos) & 1) &&
             get_stream_idx(d + 1) < s->nb_streams)
@@ -1153,6 +1153,9 @@ start_sync:
             goto start_sync;
         }
 
+        if (avi->dv_demux && n != 0)
+            continue;
+
         // parse ##dc/##wb
         if (n < s->nb_streams) {
             AVStream *st;