diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 8dd00cdd0907cbd0eb3dc0574234590b4a568c7d..14888581042f5942bc3c80082a3d1ffadd985e4c 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -553,7 +553,10 @@ static int mov_write_avid_tag(ByteIOContext *pb, MOVTrack *track)
         put_be32(pb, track->enc->height);
         put_be32(pb, 1); /* unknown */
         put_be32(pb, 0); /* unknown */
-        put_be32(pb, 5); /* unknown */
+        if (track->enc->height == 1080)
+            put_be32(pb, 5); /* unknown */
+        else
+            put_be32(pb, 6); /* unknown */
     }
     /* padding */
     for (i = 0; i < 10; i++)