[FFmpeg-devel] [PATCH] avcodec/cllc: use init_get_bits8()

Paul B Mahol onemda at gmail.com
Tue Feb 3 16:58:48 CET 2015


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

diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c
index 9c710bb..829cb52 100644
--- a/libavcodec/cllc.c
+++ b/libavcodec/cllc.c
@@ -394,7 +394,8 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data,
     ctx->bdsp.bswap16_buf((uint16_t *) ctx->swapped_buf, (uint16_t *) src,
                           data_size / 2);
 
-    init_get_bits(&gb, ctx->swapped_buf, data_size * 8);
+    if ((ret = init_get_bits8(&gb, ctx->swapped_buf, data_size)) < 0)
+        return ret;
 
     /*
      * Read in coding type. The types are as follows:
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list