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

Paul B Mahol git at videolan.org
Tue Nov 5 13:39:38 CET 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Nov  5 12:31:18 2013 +0000| [22c00962c283818b78213fcf72a2f0e6dcc16447] | committer: Paul B Mahol

avcodec/flashsv: 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=22c00962c283818b78213fcf72a2f0e6dcc16447
---

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

diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 82c66db..f9af396 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -255,7 +255,8 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
     if (buf_size < 4)
         return -1;
 
-    init_get_bits(&gb, avpkt->data, buf_size * 8);
+    if ((ret = init_get_bits(&gb, avpkt->data, buf_size)) < 0)
+        return ret;
 
     /* start to parse the bitstream */
     s->block_width  = 16 * (get_bits(&gb, 4) + 1);



More information about the ffmpeg-cvslog mailing list