You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-30 22:24:04 +02:00
ffplay: Fix invalid array index
Found-by: Thomas Guilbert <tguilbert@google.com>
Fixes: clusterfuzz_usan-2016-08-02
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6cd9a8b67a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
2
ffplay.c
2
ffplay.c
@ -2869,7 +2869,7 @@ static int read_thread(void *arg)
|
|||||||
AVStream *st = ic->streams[i];
|
AVStream *st = ic->streams[i];
|
||||||
enum AVMediaType type = st->codec->codec_type;
|
enum AVMediaType type = st->codec->codec_type;
|
||||||
st->discard = AVDISCARD_ALL;
|
st->discard = AVDISCARD_ALL;
|
||||||
if (wanted_stream_spec[type] && st_index[type] == -1)
|
if (type >= 0 && wanted_stream_spec[type] && st_index[type] == -1)
|
||||||
if (avformat_match_stream_specifier(ic, st, wanted_stream_spec[type]) > 0)
|
if (avformat_match_stream_specifier(ic, st, wanted_stream_spec[type]) > 0)
|
||||||
st_index[type] = i;
|
st_index[type] = i;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user