Ensures that the end band is always set for redundant frames
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Fri, 8 Jul 2011 02:39:19 +0000 (22:39 -0400)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Fri, 8 Jul 2011 02:39:56 +0000 (22:39 -0400)
src/opus_decoder.c
src/opus_encoder.c

index d71282c..84b4465 100644 (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;
index 3013c84..076c053 100644 (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;