avcodec/mpc7: use init_get_bits8()
authorPaul B Mahol <onemda@gmail.com>
Fri, 3 Feb 2017 19:16:30 +0000 (20:16 +0100)
committerPaul B Mahol <onemda@gmail.com>
Fri, 3 Feb 2017 19:16:30 +0000 (20:16 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/mpc7.c

index d13316b..e09f1b6 100644 (file)
@@ -231,7 +231,8 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data,
         return AVERROR(ENOMEM);
     c->bdsp.bswap_buf((uint32_t *) c->bits, (const uint32_t *) buf,
                       buf_size >> 2);
-    init_get_bits(&gb, c->bits, buf_size * 8);
+    if ((ret = init_get_bits8(&gb, c->bits, buf_size)) < 0)
+        return ret;
     skip_bits_long(&gb, skip);
 
     /* read subband indexes */