diff --git a/celt/laplace.c b/celt/laplace.c index 53673130..30f2aab1 100644 --- a/celt/laplace.c +++ b/celt/laplace.c @@ -40,11 +40,12 @@ direction). */ #define LAPLACE_NMIN (16) +/* When called, decay is positive and at most 11456. */ static unsigned ec_laplace_get_freq1(unsigned fs0, int decay) { unsigned ft; ft = 32768 - LAPLACE_MINP*(2*LAPLACE_NMIN) - fs0; - return ft*(16384-decay)>>15; + return ft*(opus_int32)(16384-decay)>>15; } void ec_laplace_encode(ec_enc *enc, int *value, unsigned fs, int decay)