Commit e5454065 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Michael Niedermayer

matroskadec: check s->streams[k] before using it

This fixes a segmentation fault.
Signed-off-by: 's avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d43cd6b0
......@@ -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;
......
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