Skip to content
Snippets Groups Projects
Verified Commit 574c766c authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Infinite loops are bad

parent 00580a63
No related branches found
No related tags found
No related merge requests found
Pipeline #4080 passed
......@@ -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]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment