Commit 20e0d228 authored by aurel's avatar aurel

check return value of matroska_find_track_by_num (fix a segfault)

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12659 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 5727ac91
......@@ -2355,6 +2355,7 @@ matroska_read_header (AVFormatContext *s,
for (i=0; i<matroska->num_indexes; i++) {
MatroskaDemuxIndex *idx = &matroska->index[i];
track = matroska_find_track_by_num(matroska, idx->track);
if (track < 0) continue;
stream = matroska->tracks[track]->stream_index;
if (stream >= 0 && stream < matroska->ctx->nb_streams)
av_add_index_entry(matroska->ctx->streams[stream],
......
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