avcodec/on2avc: use init_get_bits8()
authorPaul B Mahol <onemda@gmail.com>
Tue, 3 Feb 2015 15:31:53 +0000 (15:31 +0000)
committerPaul B Mahol <onemda@gmail.com>
Wed, 4 Feb 2015 09:45:41 +0000 (09:45 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/on2avc.c

index 9bf5e87..4ad6eca 100644 (file)
@@ -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;