prevent busting at ridiculously low bit-rate VBR
This commit is contained in:
parent
45f1110583
commit
7a047ea096
1 changed files with 3 additions and 1 deletions
|
@ -771,6 +771,8 @@ int celt_encode_float(CELTEncoder * restrict st, const celt_sig * pcm, celt_sig
|
||||||
|
|
||||||
vbr_bound = st->vbr_rate;
|
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)
|
if (max_allowed < nbCompressedBytes)
|
||||||
nbCompressedBytes = max_allowed;
|
nbCompressedBytes = max_allowed;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue