[FFmpeg-cvslog] r21709 - in branches/0.5: . libavformat/mov.c

siretart subversion
Tue Feb 9 19:41:17 CET 2010


Author: siretart
Date: Tue Feb  9 19:41:17 2010
New Revision: 21709

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

backported patch r19792 by bcoudurier

Modified:
   branches/0.5/   (props changed)
   branches/0.5/libavformat/mov.c

Modified: branches/0.5/libavformat/mov.c
==============================================================================
--- branches/0.5/libavformat/mov.c	Tue Feb  9 19:24:30 2010	(r21708)
+++ branches/0.5/libavformat/mov.c	Tue Feb  9 19:41:17 2010	(r21709)
@@ -1776,9 +1776,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