4xm: drop pointless assert
authorLuca Barbato <lu_zero@gentoo.org>
Thu, 6 Jun 2013 12:21:19 +0000 (14:21 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 12 Jun 2013 12:45:46 +0000 (14:45 +0200)
Make sure the value of wlog2 is always between 0 and 3.

libavcodec/4xm.c

index 4a293eb..1e70644 100644 (file)
@@ -327,7 +327,7 @@ static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w,
         }
         break;
     default:
-        assert(0);
+        break;
     }
 }
 
@@ -343,7 +343,7 @@ static int decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src,
     uint16_t *end   = start + stride * (f->avctx->height - h + 1) - (1 << log2w);
     int ret;
 
-    if (code < 0 || code > 6)
+    if (code < 0 || code > 6 || log2w < 0)
         return AVERROR_INVALIDDATA;
 
     if (code == 0) {