[Ffmpeg-cvslog] CVS: ffmpeg/libavformat utils.c,1.167,1.168

Michael Niedermayer CVS michael
Sat Nov 5 00:50:15 CET 2005


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

Modified Files:
	utils.c 
Log Message:
allow NULL write_header() and write_trailer()


Index: utils.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/utils.c,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -d -r1.167 -r1.168
--- utils.c	18 Sep 2005 14:45:17 -0000	1.167
+++ utils.c	4 Nov 2005 23:50:11 -0000	1.168
@@ -2253,9 +2253,11 @@
         }
     }
 
-    ret = s->oformat->write_header(s);
-    if (ret < 0)
-        return ret;
+    if(s->oformat->write_header){
+        ret = s->oformat->write_header(s);
+        if (ret < 0)
+            return ret;
+    }
 
     /* init PTS generation */
     for(i=0;i<s->nb_streams;i++) {
@@ -2540,7 +2542,8 @@
             goto fail;
     }
 
-    ret = s->oformat->write_trailer(s);
+    if(s->oformat->write_trailer)
+        ret = s->oformat->write_trailer(s);
 fail:
     if(ret == 0)
        ret=url_ferror(&s->pb);





More information about the ffmpeg-cvslog mailing list