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

Paul B Mahol git at videolan.org
Wed Feb 4 10:59:12 CET 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Feb  3 15:10:00 2015 +0000| [e9eb94ac5a66fd1e91b4279156bc0cdd0117b576] | committer: Paul B Mahol

avcodec/qcelpdec: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavcodec/qcelpdec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
index 6f08607..03364f6 100644
--- a/libavcodec/qcelpdec.c
+++ b/libavcodec/qcelpdec.c
@@ -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));
 



More information about the ffmpeg-cvslog mailing list