Module: libav
Branch: release/11
Commit: d8ca97eec01eaf2fa7ec7421b5e6bdbeea9da7db

Author:    Michael Niedermayer <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Sat Nov 28 21:06:45 2015 +0100

avi: Validate the stream-id for DV as well

Avoid false positives while syncing.

Bug-Id: ffmpeg/4086
Bug-Id: 879

Signed-off-by: Michael Niedermayer <[email protected]>
Signed-off-by: Luca Barbato <[email protected]>

---

 libavformat/avidec.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 54c4814..928bbaa 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -976,7 +976,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)
@@ -988,6 +988,9 @@ start_sync:
             goto start_sync;
         }
 
+        if (avi->dv_demux && n != 0)
+            continue;
+
         // parse ##dc/##wb
         if (n < s->nb_streams) {
             AVStream *st;

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to