[FFmpeg-cvslog] r19792 - trunk/libavformat/mov.c

bcoudurier subversion
Tue Sep 8 00:36:34 CEST 2009


Author: bcoudurier
Date: Tue Sep  8 00:36:33 2009
New Revision: 19792

Log:
add one missing check for stream existence in read_elst, fix #1364

Modified:
   trunk/libavformat/mov.c

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	Mon Sep  7 12:49:51 2009	(r19791)
+++ trunk/libavformat/mov.c	Tue Sep  8 00:36:33 2009	(r19792)
@@ -1905,9 +1905,13 @@ free_and_return:
 /* edit list atom */
 static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
 {
-    MOVStreamContext *sc = c->fc->streams[c->fc->nb_streams-1]->priv_data;
+    MOVStreamContext *sc;
     int i, edit_count;
 
+    if (c->fc->nb_streams < 1)
+        return 0;
+    sc = c->fc->streams[c->fc->nb_streams-1]->priv_data;
+
     get_byte(pb); /* version */
     get_be24(pb); /* flags */
     edit_count = get_be32(pb); /* entries */



More information about the ffmpeg-cvslog mailing list