diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-10-29 09:46:32 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-10-30 11:04:07 +0000 |
commit | 82e576046c6b96576865855a3901b23c93f6317d (patch) | |
tree | 11284e9ab892981c3ea8a6b7f86ca372a76c4448 /libavcodec/wavpack.c | |
parent | 49c6f0ae15a04e580b4c653dfa7f9ca8bf51a1ca (diff) | |
download | ffmpeg-82e576046c6b96576865855a3901b23c93f6317d.tar.gz |
avcodec/wavpack: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r-- | libavcodec/wavpack.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 94a4cb4d6a..6036a5c7dd 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -847,7 +847,8 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no, case WP_ID_DATA: s->sc.offset = bytestream2_tell(&gb); 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; bytestream2_skip(&gb, size); 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.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); bytestream2_skip(&gb, size); s->got_extra_bits = 1; |