From f09afb4a90b2ee14577b4bedc9f16ac2b5dfcf72 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 3 Feb 2017 20:16:30 +0100 Subject: [PATCH] avcodec/mpc7: use init_get_bits8() Signed-off-by: Paul B Mahol --- libavcodec/mpc7.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index d13316b120..e09f1b604f 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -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 */