[FFmpeg-cvslog] avformat/mux: flush after header writing, like after packets
Michael Niedermayer
git at videolan.org
Sun Aug 3 18:23:50 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Aug 3 17:44:56 2014 +0200| [fee982048e338efd3b8c1b2dcaf826cb7944cd81] | committer: 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: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fee982048e338efd3b8c1b2dcaf826cb7944cd81
---
libavformat/mux.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mux.c b/libavformat/mux.c
index be72d91..dbb9b55 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -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)
More information about the ffmpeg-cvslog
mailing list