mirror of https://git.ffmpeg.org/ffmpeg.git
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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b4d525eb63
commit
fee982048e
|
@ -421,6 +421,8 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
|
||||||
ret = s->pb->error;
|
ret = s->pb->error;
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
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)
|
if ((ret = init_pts(s)) < 0)
|
||||||
|
|
Loading…
Reference in New Issue