Fixes a ibudget bust and a divide-by-zero at very low bit-rate

This commit is contained in:
Jean-Marc Valin 2010-09-29 20:05:36 -04:00
parent b1fe4f60e6
commit 83c26fbd7b
2 changed files with 4 additions and 1 deletions

View file

@ -190,7 +190,7 @@ static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int
}
codedBands++;
/* Allocate the remaining bits */
{
if (codedBands) {
int left, perband;
left = (total<<BITRES)-psum;
perband = left/(codedBands-start);