[FFmpeg-cvslog] avcodec/g722dec: use init_get_bits8()

Paul B Mahol git at videolan.org
Sun Dec 23 22:03:16 EET 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Dec 23 21:01:17 2018 +0100| [e483606d4455678c9dc301ca7c69a2696c23cbd8] | committer: Paul B Mahol

avcodec/g722dec: use init_get_bits8()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e483606d4455678c9dc301ca7c69a2696c23cbd8
---

 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;



More information about the ffmpeg-cvslog mailing list