avcodec/wavpack: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2013-10-29 09:46:32 +00:00
parent 49c6f0ae15
commit 82e576046c
1 changed files with 4 additions and 2 deletions

View File

@ -847,7 +847,8 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
case WP_ID_DATA: case WP_ID_DATA:
s->sc.offset = bytestream2_tell(&gb); s->sc.offset = bytestream2_tell(&gb);
s->sc.size = size * 8; s->sc.size = size * 8;
init_get_bits(&s->gb, gb.buffer, size * 8); if ((ret = init_get_bits8(&s->gb, gb.buffer, size)) < 0)
return ret;
s->data_size = size * 8; s->data_size = size * 8;
bytestream2_skip(&gb, size); bytestream2_skip(&gb, size);
got_bs = 1; got_bs = 1;
@ -861,7 +862,8 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
} }
s->extra_sc.offset = bytestream2_tell(&gb); s->extra_sc.offset = bytestream2_tell(&gb);
s->extra_sc.size = size * 8; s->extra_sc.size = size * 8;
init_get_bits(&s->gb_extra_bits, gb.buffer, size * 8); if ((ret = init_get_bits8(&s->gb_extra_bits, gb.buffer, size)) < 0)
return ret;
s->crc_extra_bits = get_bits_long(&s->gb_extra_bits, 32); s->crc_extra_bits = get_bits_long(&s->gb_extra_bits, 32);
bytestream2_skip(&gb, size); bytestream2_skip(&gb, size);
s->got_extra_bits = 1; s->got_extra_bits = 1;