Fix bug in OPUS_SET_BANDWIDTH_REQUEST.
authorGregory Maxwell <greg@xiph.org>
Sun, 2 Oct 2011 07:19:15 +0000 (03:19 -0400)
committerGregory Maxwell <greg@xiph.org>
Sun, 2 Oct 2011 07:21:50 +0000 (03:21 -0400)
src/opus_encoder.c

index b075e0c..5750f32 100644 (file)
@@ -1077,7 +1077,7 @@ int opus_encoder_ctl(OpusEncoder *st, int request, ...)
             st->user_bandwidth = value;
             if (st->user_bandwidth == OPUS_BANDWIDTH_NARROWBAND) {
                 st->silk_mode.maxInternalSampleRate = 8000;
-            } else if (st->bandwidth == OPUS_BANDWIDTH_MEDIUMBAND) {
+            } else if (st->user_bandwidth == OPUS_BANDWIDTH_MEDIUMBAND) {
                 st->silk_mode.maxInternalSampleRate = 12000;
             } else {
                 st->silk_mode.maxInternalSampleRate = 16000;