[Ffmpeg-cvslog] CVS: ffmpeg/libavformat mov.c,1.82,1.83

Michael Niedermayer CVS michael
Sat May 21 12:26:00 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv27423

Modified Files:
	mov.c 
Log Message:
segfault fix


Index: mov.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/mov.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- mov.c	21 May 2005 09:50:25 -0000	1.82
+++ mov.c	21 May 2005 10:25:58 -0000	1.83
@@ -772,10 +772,12 @@
     
     for(i=0; i<c->fc->nb_streams; i++){
         MOVStreamContext *sc2 = (MOVStreamContext *)c->fc->streams[i]->priv_data;
-        int64_t first= sc2->chunk_offsets[0];
-        int64_t last= sc2->chunk_offsets[sc2->chunk_count-1];
-        if(first >= sc->chunk_offsets[entries-1] || last <= sc->chunk_offsets[0])
-            c->ni=1;
+        if(sc2 && sc2->chunk_offsets){
+            int64_t first= sc2->chunk_offsets[0];
+            int64_t last= sc2->chunk_offsets[sc2->chunk_count-1];
+            if(first >= sc->chunk_offsets[entries-1] || last <= sc->chunk_offsets[0])
+                c->ni=1;
+        }
     }
 #ifdef DEBUG
 /*





More information about the ffmpeg-cvslog mailing list