From 4d48add89b2c5124d660b5672f5d2c549cd65bc6 Mon Sep 17 00:00:00 2001 From: Thilo Borgmann Date: Fri, 9 Sep 2016 12:29:23 +0200 Subject: [PATCH] lavc/alsdec: use get_bitsz() to simplify reading of the mantissa Signed-off-by: James Almer --- libavcodec/alsdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 8c4ff53617..3986347ee2 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1527,7 +1527,7 @@ static int read_diff_float_data(ALSDecContext *ctx, unsigned int ra_frame) { if (!get_bits1(gb)) { //uncompressed for (i = 0; i < frame_length; ++i) { if (ctx->raw_samples[c][i] != 0) { - raw_mantissa[c][i] = nbits[i] ? get_bits(gb, nbits[i]) : 0; + raw_mantissa[c][i] = get_bitsz(gb, nbits[i]); } } } else { //compressed