From e483606d4455678c9dc301ca7c69a2696c23cbd8 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 23 Dec 2018 21:01:17 +0100 Subject: [PATCH] avcodec/g722dec: use init_get_bits8() --- libavcodec/g722dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c index 000b591fe6..7c270bc33a 100644 --- a/libavcodec/g722dec.c +++ b/libavcodec/g722dec.c @@ -100,7 +100,9 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data, return ret; out_buf = (int16_t *)frame->data[0]; - init_get_bits(&gb, avpkt->data, avpkt->size * 8); + ret = init_get_bits8(&gb, avpkt->data, avpkt->size); + if (ret < 0) + return ret; for (j = 0; j < avpkt->size; j++) { int ilow, ihigh, rlow, rhigh, dhigh;