Ensures that the end band is always set for redundant frames

This commit is contained in:
Jean-Marc Valin 2011-07-07 22:39:19 -04:00
parent 0d031d61a3
commit cc14cdf875
2 changed files with 2 additions and 1 deletions

View file

@ -296,7 +296,6 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
if (mode != MODE_CELT_ONLY)
start_band = 17;
if (mode != MODE_SILK_ONLY)
{
int endband=21;
@ -305,6 +304,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
case OPUS_BANDWIDTH_NARROWBAND:
endband = 13;
break;
case OPUS_BANDWIDTH_MEDIUMBAND:
case OPUS_BANDWIDTH_WIDEBAND:
endband = 17;
break;

View file

@ -438,6 +438,7 @@ int opus_encode(OpusEncoder *st, const short *pcm, int frame_size,
case OPUS_BANDWIDTH_NARROWBAND:
endband = 13;
break;
case OPUS_BANDWIDTH_MEDIUMBAND:
case OPUS_BANDWIDTH_WIDEBAND:
endband = 17;
break;