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);