shithub: opus

Download patch

ref: 8714189c6495eae49829b8e649101ba3bdc86127
parent: 220a7d4ba82bffc2955277b41df6f0163dc1bccb
author: Gregory Maxwell <[email protected]>
date: Sat Oct 1 23:19:15 EDT 2011

Fix bug in OPUS_SET_BANDWIDTH_REQUEST.

--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -1077,7 +1077,7 @@
             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;