Mercurial > libavformat.hg
changeset 3199:df53e261fe4d libavformat
check return value of matroska_find_track_by_num (fix a segfault)
author | aurel |
---|---|
date | Mon, 31 Mar 2008 20:16:04 +0000 |
parents | 814a32de9ec7 |
children | a437fb5ca080 |
files | matroskadec.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/matroskadec.c Mon Mar 31 17:31:11 2008 +0000 +++ b/matroskadec.c Mon Mar 31 20:16:04 2008 +0000 @@ -2355,6 +2355,7 @@ 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],