Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2012-12-21 22:09:43 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2012-12-21 22:09:43 +0400
commit23fcd706fb6b752c642f94436a63b65afb6e8d0c (patch)
tree2e8ba7432652467ec73cc75eba9f3151b8a65cc3 /src
parent2dd3fb9d593eec5d4121ccfe19e927f03ed75931 (diff)
Only use automatic bandwidth detection when the user doesn't force bandwidth
Also fixes an issue with 40- and 60-ms frames using the repacketizer.
Diffstat (limited to 'src')
-rw-r--r--src/opus_encoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index d1df5bfa..be245bd9 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -858,7 +858,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_
if (st->Fs <= 8000 && st->bandwidth > OPUS_BANDWIDTH_NARROWBAND)
st->bandwidth = OPUS_BANDWIDTH_NARROWBAND;
#ifndef FIXED_POINT
- if (st->detected_bandwidth)
+ if (st->detected_bandwidth && st->user_bandwidth == OPUS_AUTO)
{
st->bandwidth = IMIN(st->bandwidth, st->detected_bandwidth);
}