diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index 48625f8b1ce7d823ad985827c28c62bf5ef2fc81..721b3f087b84335df032129d8601e454d24f016b 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -393,7 +393,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
         }
     }
 
-    if (header.compression > 17) {
+    if (header.compression >= 17) {
         av_log(s->avctx, AV_LOG_ERROR, "invalid compression type (%d)\n", header.compression);
         return -1;
     }