ref: 23fcd706fb6b752c642f94436a63b65afb6e8d0c
parent: 2dd3fb9d593eec5d4121ccfe19e927f03ed75931
author: Jean-Marc Valin <[email protected]>
date: Fri Dec 21 08:09:43 EST 2012
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.
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -858,7 +858,7 @@
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);
}