ffmpeg | branch: master | Michael Niedermayer <michae...@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 <michae...@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)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to