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

Paul B Mahol git at videolan.org
Sat Feb 7 16:19:16 CET 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Feb  7 14:26:54 2015 +0000| [ec8ec999f4a3f56ba39328106d358ee01efbc14e] | committer: Paul B Mahol

avcodec/twinvqdec: 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=ec8ec999f4a3f56ba39328106d358ee01efbc14e
---

 libavcodec/twinvqdec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/twinvqdec.c b/libavcodec/twinvqdec.c
index 67ce031..3ea4dfa 100644
--- a/libavcodec/twinvqdec.c
+++ b/libavcodec/twinvqdec.c
@@ -256,9 +256,10 @@ static int twinvq_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx,
     int channels              = tctx->avctx->channels;
     int sub;
     GetBitContext gb;
-    int i, j, k;
+    int i, j, k, ret;
 
-    init_get_bits(&gb, buf, buf_size * 8);
+    if ((ret = init_get_bits8(&gb, buf, buf_size)) < 0)
+        return ret;
     skip_bits(&gb, get_bits(&gb, 8));
 
     bits->window_type = get_bits(&gb, TWINVQ_WINDOW_TYPE_BITS);



More information about the ffmpeg-cvslog mailing list