[FFmpeg-cvslog] r12659 - trunk/libavformat/matroskadec.c

aurel subversion
Mon Mar 31 22:16:05 CEST 2008


Author: aurel
Date: Mon Mar 31 22:16:04 2008
New Revision: 12659

Log:
check return value of matroska_find_track_by_num (fix a segfault)

Modified:
   trunk/libavformat/matroskadec.c

Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c	(original)
+++ trunk/libavformat/matroskadec.c	Mon Mar 31 22:16:04 2008
@@ -2355,6 +2355,7 @@ matroska_read_header (AVFormatContext   
         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],




More information about the ffmpeg-cvslog mailing list