avcodec/indeo2: use init_get_bits8
authorPaul B Mahol <onemda@gmail.com>
Sun, 20 Dec 2015 20:31:55 +0000 (21:31 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 20 Dec 2015 20:31:55 +0000 (21:31 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/indeo2.c

index 74135b9..3424e00 100644 (file)
@@ -165,7 +165,8 @@ static int ir2_decode_frame(AVCodecContext *avctx,
         buf[i] = ff_reverse[buf[i]];
 #endif
 
-    init_get_bits(&s->gb, buf + start, (buf_size - start) * 8);
+    if ((ret = init_get_bits8(&s->gb, buf + start, buf_size - start)) < 0)
+        return ret;
 
     if (s->decode_delta) { /* intraframe */
         if ((ret = ir2_decode_plane(s, avctx->width, avctx->height,