From cc14cdf87515d3923875ffa3087fa13d4fb025da Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Thu, 7 Jul 2011 22:39:19 -0400 Subject: [PATCH] Ensures that the end band is always set for redundant frames --- src/opus_decoder.c | 2 +- src/opus_encoder.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/opus_decoder.c b/src/opus_decoder.c index d71282c2..84b4465b 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -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; diff --git a/src/opus_encoder.c b/src/opus_encoder.c index 3013c84e..076c053b 100644 --- a/src/opus_encoder.c +++ b/src/opus_encoder.c @@ -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;