avcodec/qcelpdec: use init_get_bits8()
authorPaul B Mahol <onemda@gmail.com>
Tue, 3 Feb 2015 15:10:00 +0000 (15:10 +0000)
committerPaul B Mahol <onemda@gmail.com>
Wed, 4 Feb 2015 09:45:41 +0000 (09:45 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/qcelpdec.c

index 6f08607..03364f6 100644 (file)
@@ -719,7 +719,8 @@ static int qcelp_decode_frame(AVCodecContext *avctx, void *data,
                                          qcelp_unpacking_bitmaps_lengths[q->bitrate];
         uint8_t *unpacked_data         = (uint8_t *)&q->frame;
 
-        init_get_bits(&q->gb, buf, 8 * buf_size);
+        if ((ret = init_get_bits8(&q->gb, buf, buf_size)) < 0)
+            return ret;
 
         memset(&q->frame, 0, sizeof(QCELPFrame));