aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-11-28 21:06:45 +0100
committerLuca Barbato <lu_zero@gentoo.org>2015-12-02 23:49:10 +0100
commit0fc61c6ab6912a2f0c40fdd3f3c591bc2a33efd4 (patch)
tree72f172df354cf8a9ef976c9663ae0f582327ede9 /libavformat/avidec.c
parentd017ed878a45171f2f6c69fb9d76401c3c494110 (diff)
downloadffmpeg-0fc61c6ab6912a2f0c40fdd3f3c591bc2a33efd4.tar.gz
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 <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 43c178ff7e..477e04556f 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -995,7 +995,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)
@@ -1007,6 +1007,9 @@ start_sync:
goto start_sync;
}
+ if (avi->dv_demux && n != 0)
+ continue;
+
// parse ##dc/##wb
if (n < s->nb_streams) {
AVStream *st;