summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2015-11-17 18:19:01 +0100
committerMichael Niedermayer <[email protected]>2015-11-26 16:58:33 +0100
commiteb2f0a44650db8c295ffe9c28eea98fd0ecfc8f2 (patch)
tree0e7733faca9a26a20d7553b9f6368bdabc410b7c
parentfddf95da951204a75f52690a5f4cdb58fc3e5396 (diff)
avformat/matroskadec: Check subtitle stream before dereferencing
Unrecognized streams are not allocated Fixes: flicker-1.color1.vp91447030769.08.webm Found-by: Chris Cunningham <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit a5034b324cad4c29d47ef285a30b0705e6eb0384) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavformat/matroskadec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 126625fa2e..9107815615 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2971,6 +2971,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
tracks[i].audio.buf_timecode = AV_NOPTS_VALUE;
tracks[i].end_timecode = 0;
if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE &&
+ tracks[i].stream &&
tracks[i].stream->discard != AVDISCARD_ALL) {
index_sub = av_index_search_timestamp(
tracks[i].stream, st->index_entries[index].timestamp,