ref: 23f3a1f1d763c9a9cf350b9915f4cc69469d0d61
parent: afd05aca0cdb2cd4b530d00cbb823ecc148b5780
author: Jean-Marc Valin <[email protected]>
date: Sun Oct 30 18:41:32 EDT 2011
Fixes a redundancy bug in glitchless SILK-SILK switching The CELT encoder could end up using a non-max bit-rate and not use all the bytes it's supposed to use.
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -981,10 +981,10 @@
celt_encoder_ctl(celt_enc, CELT_SET_END_BAND(endband));
celt_encoder_ctl(celt_enc, CELT_SET_CHANNELS(st->stream_channels));
}
+ celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(OPUS_BITRATE_MAX));
if (st->mode != MODE_SILK_ONLY)
{
celt_encoder_ctl(celt_enc, OPUS_SET_VBR(0));
- celt_encoder_ctl(celt_enc, OPUS_SET_BITRATE(OPUS_BITRATE_MAX));
/* Allow prediction unless we decide to disable it later */
celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(2));