# HG changeset patch # User michael # Date 1131148211 0 # Node ID 8ff4e8ef81248c6e18cb8f7f64a40f5c0b58ccce # Parent c6b1dde68f3a4601b83eff041cc222a6e1013586 allow NULL write_header() and write_trailer() diff -r c6b1dde68f3a -r 8ff4e8ef8124 utils.c --- a/utils.c Sat Oct 29 00:52:02 2005 +0000 +++ b/utils.c Fri Nov 04 23:50:11 2005 +0000 @@ -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;inb_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);