Commit 7a047ea0 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

prevent busting at ridiculously low bit-rate VBR

parent 45f11105
......@@ -770,7 +770,9 @@ int celt_encode_float(CELTEncoder * restrict st, const celt_sig * pcm, celt_sig
celt_int32 vbr_bound, max_allowed;
vbr_bound = st->vbr_rate;
max_allowed = (st->vbr_rate + vbr_bound - st->vbr_reservoir)>>(BITRES+3);
max_allowed = (st->vbr_rate + vbr_bound - st->vbr_reservoir)>>(BITRES+3);
if (max_allowed < 4)
max_allowed = 4;
if (max_allowed < nbCompressedBytes)
nbCompressedBytes = max_allowed;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment