From 8714189c6495eae49829b8e649101ba3bdc86127 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Sun, 2 Oct 2011 03:19:15 -0400
Subject: [PATCH] Fix bug in OPUS_SET_BANDWIDTH_REQUEST.

---
 src/opus_encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index b075e0c86..5750f328c 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -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;
-- 
GitLab