diff options
author | Jean-Marc Valin <jmvalin@amazon.com> | 2023-09-24 00:48:12 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@amazon.com> | 2023-09-24 00:48:12 +0300 |
commit | 574c766c0c34eeb01e2c8aec7abd59d667e85267 (patch) | |
tree | 852b13f499d163c479ff82a6df87cffb9339c26d | |
parent | 00580a63aa4d0f796bd9b11c7514fce7c09dcd94 (diff) |
Infinite loops are bad
-rw-r--r-- | silk/dred_coding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/silk/dred_coding.c b/silk/dred_coding.c index f8d2f070..af735faf 100644 --- a/silk/dred_coding.c +++ b/silk/dred_coding.c @@ -62,7 +62,7 @@ void dred_encode_latents(ec_enc *enc, const float *x, const opus_uint16 *scale, xq = xq - delta*tanh(xq/(delta+eps)); q = (int)floor(.5f+xq); /* Make the impossible actually impossible. */ - if (r[i] == 0 || p0[i] >= 32768) q = 0; + if (r[i] == 0 || p0[i] >= 32767) q = 0; ec_laplace_encode_p0(enc, q, p0[i], r[i]); } } |