diff --git a/libavformat/mov.c b/libavformat/mov.c
index 712629520a5394eaf620542751d4bb8fe80c25f5..c7caf80b11ced9bc6cc614e3dd0578f6c20488e7 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -243,7 +243,8 @@ static int mov_metadata_loci(MOVContext *c, AVIOContext *pb, unsigned len)
     len -= 1;
 
     if (len < 12) {
-        av_log(c->fc, AV_LOG_ERROR, "no space for coordinates left (%d)\n", len);
+        av_log(c->fc, AV_LOG_ERROR,
+               "loci too short (%u bytes left, need at least %d)\n", len, 12);
         return AVERROR_INVALIDDATA;
     }
     longitude = ((int32_t) avio_rb32(pb)) / (float) (1 << 16);