Commit 0fc61c6a authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Luca Barbato

avi: Validate the stream-id for DV as well

Avoid false positives while syncing.

Bug-Id: ffmpeg/4086
Bug-Id: 879
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
parent d017ed87
...@@ -995,7 +995,7 @@ start_sync: ...@@ -995,7 +995,7 @@ start_sync:
goto 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) && if (!((i - avi->last_pkt_pos) & 1) &&
get_stream_idx(d + 1) < s->nb_streams) get_stream_idx(d + 1) < s->nb_streams)
...@@ -1007,6 +1007,9 @@ start_sync: ...@@ -1007,6 +1007,9 @@ start_sync:
goto start_sync; goto start_sync;
} }
if (avi->dv_demux && n != 0)
continue;
// parse ##dc/##wb // parse ##dc/##wb
if (n < s->nb_streams) { if (n < s->nb_streams) {
AVStream *st; AVStream *st;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment