mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 18:40:03 +01:00
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>
(cherry picked from commit e54540655f)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
43bfe0ada5
commit
84cc40cbe1
@@ -1942,7 +1942,7 @@ static int matroska_parse_tracks(AVFormatContext *s)
|
|||||||
snprintf(buf, sizeof(buf), "%s_%d",
|
snprintf(buf, sizeof(buf), "%s_%d",
|
||||||
ff_matroska_video_stereo_plane[planes[j].type], i);
|
ff_matroska_video_stereo_plane[planes[j].type], i);
|
||||||
for (k=0; k < matroska->tracks.nb_elem; k++)
|
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,
|
av_dict_set(&s->streams[k]->metadata,
|
||||||
"stereo_mode", buf, 0);
|
"stereo_mode", buf, 0);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user