Commit fee98204 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mux: flush after header writing, like after packets

This makes problematic unconditional flushes in mpegts redundant
And is thus part of a fix for ticket 2748
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b4d525eb
......@@ -421,6 +421,8 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
ret = s->pb->error;
if (ret < 0)
return ret;
if (s->flush_packets && s->pb && s->pb->error >= 0 && s->flags & AVFMT_FLAG_FLUSH_PACKETS)
avio_flush(s->pb);
}
if ((ret = init_pts(s)) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment