[FFmpeg-cvslog] movenc: Don't flush after each written packet

Martin Storsjö git at videolan.org
Tue Sep 3 15:24:14 CEST 2013


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Mon Sep  2 16:23:17 2013 +0300| [0fbda03e5cfce9d37a263abd08947e5a64ed8ee9] | committer: Martin Storsjö

movenc: Don't flush after each written packet

This should improve write performance quite significantly.
---
Tested with both writing a normal mp4, by using the faststart
feature and writing a fragmented mp4 file; all turn out with the
same md5sum as before.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0fbda03e5cfce9d37a263abd08947e5a64ed8ee9
---

 libavformat/movenc.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 5836f5e..29f5145 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2961,8 +2961,6 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
     trk->sample_count += samples_in_chunk;
     mov->mdat_size    += size;
 
-    avio_flush(pb);
-
     if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams)
         ff_mov_add_hinted_packet(s, pkt, trk->hint_track, trk->entry,
                                  reformatted_data, size);



More information about the ffmpeg-cvslog mailing list