diff options
author | Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> | 2015-05-03 23:55:20 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-04 15:48:55 +0200 |
commit | e54540655f229d06667dc7fa7005f2a20e101e80 (patch) | |
tree | 1893fedef523ace338e2f61e66b2737050163936 /libavformat/matroskadec.c | |
parent | d43cd6b08ed555c303478e3133717fbb2236be6e (diff) | |
download | ffmpeg-e54540655f229d06667dc7fa7005f2a20e101e80.tar.gz |
matroskadec: check s->streams[k] before using it
This fixes a segmentation fault.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 27d184ef48..31723b3b86 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -2012,7 +2012,7 @@ static int matroska_parse_tracks(AVFormatContext *s) snprintf(buf, sizeof(buf), "%s_%d", ff_matroska_video_stereo_plane[planes[j].type], i); for (k=0; k < matroska->tracks.nb_elem; k++) - if (planes[j].uid == tracks[k].uid) { + if (planes[j].uid == tracks[k].uid && s->streams[k]) { av_dict_set(&s->streams[k]->metadata, "stereo_mode", buf, 0); break; |