avcodec/on2avc: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2015-02-03 15:31:53 +00:00
parent 49f8257135
commit 1634d2bcd1
1 changed files with 3 additions and 1 deletions

View 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;