From 0fbda03e5cfce9d37a263abd08947e5a64ed8ee9 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Mon, 2 Sep 2013 16:23:17 +0300 Subject: movenc: Don't flush after each written packet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ö --- libavformat/movenc.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'libavformat') diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 5836f5e202..29f5145857 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); -- cgit v1.2.3