]> git.sesse.net Git - ffmpeg/commitdiff
lavc/alsdec: use get_bitsz() to simplify reading of the mantissa
authorThilo Borgmann <thilo.borgmann@mail.de>
Fri, 9 Sep 2016 10:29:23 +0000 (12:29 +0200)
committerJames Almer <jamrial@gmail.com>
Fri, 9 Sep 2016 14:50:12 +0000 (11:50 -0300)
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/alsdec.c

index 8c4ff53617e82aec1284c9fc8d125ffdd50fde01..3986347ee2e9116d4f6fff71e2f8c1d916c7b725 100644 (file)
@@ -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