summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-11-07 01:18:05 +0200
committerMartin Storsjö <martin@martin.st>2015-11-10 21:46:03 +0200
commit8ad5124b7ecf7f727724e270a7b4bb8c7bcbf6a4 (patch)
tree8fd220dac481307e7ca7e3a3b994f860533d31de /libavformat/movenc.c
parentdb9b7321d5dfcbaf521d46beec44cf724776c70d (diff)
movenc: Automatically flush after writing the initial moov
In most other cases when writing fragmented mp4 files, the output IO context is flushed after each fragment. Also flush it after writing the initial moov, to have it behave in the same way. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 572e781fdc..3ee54bf3f3 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4048,6 +4048,7 @@ static int mov_write_header(AVFormatContext *s)
if (mov->flags & FF_MOV_FLAG_EMPTY_MOOV &&
!(mov->flags & FF_MOV_FLAG_DELAY_MOOV)) {
mov_write_moov_tag(pb, mov, s);
+ avio_flush(pb);
mov->moov_written = 1;
if (mov->flags & FF_MOV_FLAG_GLOBAL_SIDX)
mov->reserved_header_pos = avio_tell(pb);