aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/wavpack.c
diff options
context:
space:
mode:
authorRonald S. Bultje2009-11-16 17:42:43 +0000
committerRonald S. Bultje2009-11-16 17:42:43 +0000
commit6e44ba15504c05adb4ba610d83205bb7c499fb58 (patch)
tree910661d34317012741c036fa07b4fc5f20026bc6 /libavcodec/wavpack.c
parent830628e11caa35306fb214fb890e6c0c481fd6c8 (diff)
Use get_bits_left() instead of size_in_bits - get_bits_count().
Originally committed as revision 20543 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wavpack.c')
-rw-r--r--libavcodec/wavpack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 95f1d7123b..783e7d70bf 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -378,7 +378,7 @@ static float wv_get_value_float(WavpackContext *s, uint32_t *crc, int S)
if(s->got_extra_bits){
const int max_bits = 1 + 23 + 8 + 1;
- const int left_bits = s->gb_extra_bits.size_in_bits - get_bits_count(&s->gb_extra_bits);
+ const int left_bits = get_bits_left(&s->gb_extra_bits);
if(left_bits + 8 * FF_INPUT_BUFFER_PADDING_SIZE < max_bits)
return 0.0;
@@ -897,7 +897,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx,
return -1;
}
if(s->got_extra_bits && avctx->sample_fmt != SAMPLE_FMT_FLT){
- const int size = s->gb_extra_bits.size_in_bits - get_bits_count(&s->gb_extra_bits);
+ const int size = get_bits_left(&s->gb_extra_bits);
const int wanted = s->samples * s->extra_bits << s->stereo_in;
if(size < wanted){
av_log(avctx, AV_LOG_ERROR, "Too small EXTRABITS\n");