mirror of https://git.ffmpeg.org/ffmpeg.git
allow NULL write_header() and write_trailer()
Originally committed as revision 4675 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ed57bb79e8
commit
31e11451f7
|
@ -2253,9 +2253,11 @@ int av_write_header(AVFormatContext *s)
|
|||
}
|
||||
}
|
||||
|
||||
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,6 +2542,7 @@ int av_write_trailer(AVFormatContext *s)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if(s->oformat->write_trailer)
|
||||
ret = s->oformat->write_trailer(s);
|
||||
fail:
|
||||
if(ret == 0)
|
||||
|
|
Loading…
Reference in New Issue