[FFmpeg-cvslog] avcodec/on2avc: 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:31:53 2015 +0000| [1634d2bcd1410ccb60ebbade41eeeaaa9e48798c] | committer: Paul B Mahol

avcodec/on2avc: 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=1634d2bcd1410ccb60ebbade41eeeaaa9e48798c
---

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

diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c
index 9bf5e87..4ad6eca 100644
--- a/libavcodec/on2avc.c
+++ b/libavcodec/on2avc.c
@@ -795,7 +795,9 @@ static int on2avc_decode_subframe(On2AVCContext *c, const uint8_t *buf,
     GetBitContext gb;
     int i, ret;
 
-    init_get_bits(&gb, buf, buf_size * 8);
+    if ((ret = init_get_bits8(&gb, buf, buf_size)) < 0)
+        return ret;
+
     if (get_bits1(&gb)) {
         av_log(c->avctx, AV_LOG_ERROR, "enh bit set\n");
         return AVERROR_INVALIDDATA;



More information about the ffmpeg-cvslog mailing list