From b4d4ef55294fcf0da6fa8eda2a1be4bdabf7b41c Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Mon, 3 Jun 2013 19:21:17 +0000
Subject: [PATCH] flacdec: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/flacdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 1bf6dc75da7..e3c31755bfc 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -529,7 +529,8 @@ static int flac_decode_frame(AVCodecContext *avctx, void *data,
     }
 
     /* decode frame */
-    init_get_bits(&s->gb, buf, buf_size*8);
+    if ((ret = init_get_bits8(&s->gb, buf, buf_size)) < 0)
+        return ret;
     if ((ret = decode_frame(s)) < 0) {
         av_log(s->avctx, AV_LOG_ERROR, "decode_frame() failed\n");
         return ret;
-- 
GitLab