Fix the limits for CELT_SET_END_BAND_REQUEST.
The valid bands range from [start,end) everywhere, with start<end. Therefore end should never be 0, and should be allowed to extend all the way to mode->nbEBands. This patch does _not_ enforce that start<end, and it does _not_ handle clearing oldBandE[] when the valid range changes, which are separate issues.
This commit is contained in:
parent
fe40ddd999
commit
8893e530fc
1 changed files with 1 additions and 1 deletions
|
@ -1367,7 +1367,7 @@ int celt_encoder_ctl(CELTEncoder * restrict st, int request, ...)
|
||||||
case CELT_SET_END_BAND_REQUEST:
|
case CELT_SET_END_BAND_REQUEST:
|
||||||
{
|
{
|
||||||
celt_int32 value = va_arg(ap, celt_int32);
|
celt_int32 value = va_arg(ap, celt_int32);
|
||||||
if (value<0 || value>=st->mode->nbEBands)
|
if (value<1 || value>st->mode->nbEBands)
|
||||||
goto bad_arg;
|
goto bad_arg;
|
||||||
st->end = value;
|
st->end = value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue