diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-11-04 23:50:11 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-11-04 23:50:11 +0000 |
commit | 31e11451f74f29b9a962723b60ddba6590d0e87c (patch) | |
tree | efe40d64099e677d8f203edf862df776d5cfad17 | |
parent | ed57bb79e872773c0b1c83d465c0d665ef32707d (diff) | |
download | ffmpeg-31e11451f74f29b9a962723b60ddba6590d0e87c.tar.gz |
allow NULL write_header() and write_trailer()
Originally committed as revision 4675 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index c49547cdb5..3848fb1f6d 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2253,9 +2253,11 @@ int av_write_header(AVFormatContext *s) } } - 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 @@ int av_write_trailer(AVFormatContext *s) 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); |