diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e9256f8ce4d094cef0a12cd1464c0aca53e30572..7f6f70a26c420d72e801d2f947d1508e6999c274 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3836,7 +3836,7 @@ static int mov_flush_fragment(AVFormatContext *s)
     if (!(mov->flags & FF_MOV_FLAG_FRAGMENT))
         return 0;
 
-    if (!(mov->flags & FF_MOV_FLAG_EMPTY_MOOV) && mov->fragments == 0) {
+    if (mov->fragments == 0) {
         int64_t pos = avio_tell(s->pb);
         uint8_t *buf;
         int buf_size, moov_size;