Browse Source

avcodec/alsdec: fix some undefined shifts

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n3.4
Paul B Mahol 8 years ago
parent
commit
cbbd330abc
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/alsdec.c

+ 2
- 2
libavcodec/alsdec.c View File

@@ -761,7 +761,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
}

for (k = 2; k < opt_order; k++)
quant_cof[k] = (quant_cof[k] << 14) + (add_base << 13);
quant_cof[k] = (quant_cof[k] * (1 << 14)) + (add_base << 13);
}
}

@@ -866,7 +866,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
res >>= 1;

if (cur_k) {
res <<= cur_k;
res *= 1 << cur_k;
res |= get_bits_long(gb, cur_k);
}
}


Loading…
Cancel
Save