forked from FFmpeg/FFmpeg
avformat/mux: Only write HEADER marker if format has .write_header
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
8238bc0b5e
commit
5869407da2
1 changed files with 2 additions and 2 deletions
|
@ -464,9 +464,9 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
|
||||||
if ((ret = avformat_init_output(s, options)) < 0)
|
if ((ret = avformat_init_output(s, options)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
|
|
||||||
avio_write_marker(s->pb, AV_NOPTS_VALUE, AVIO_DATA_MARKER_HEADER);
|
|
||||||
if (ffofmt(s->oformat)->write_header) {
|
if (ffofmt(s->oformat)->write_header) {
|
||||||
|
if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
|
||||||
|
avio_write_marker(s->pb, AV_NOPTS_VALUE, AVIO_DATA_MARKER_HEADER);
|
||||||
ret = ffofmt(s->oformat)->write_header(s);
|
ret = ffofmt(s->oformat)->write_header(s);
|
||||||
if (ret >= 0 && s->pb && s->pb->error < 0)
|
if (ret >= 0 && s->pb && s->pb->error < 0)
|
||||||
ret = s->pb->error;
|
ret = s->pb->error;
|
||||||
|
|
Loading…
Add table
Reference in a new issue