OSDN Git Service

movenc: Don't flush after each written packet
authorMartin Storsjö <martin@martin.st>
Mon, 2 Sep 2013 13:23:17 +0000 (16:23 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 3 Sep 2013 07:36:17 +0000 (10:36 +0300)
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@martin.st>
libavformat/movenc.c

index 5836f5e..29f5145 100644 (file)
@@ -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);