diff --git a/src/opus_encoder.c b/src/opus_encoder.c index 586091fb565b927984b23a7d2dc0cd068ec3b785..e9a6c25c5044eabc0a4b50be2b6f1f38e6c8a31d 100644 --- a/src/opus_encoder.c +++ b/src/opus_encoder.c @@ -753,7 +753,7 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size, } } /* SILK is not allow to use more than 50% of max_data_bytes */ - if (max_data_bytes < 2*st->silk_mode.bitRate*frame_size / (st->Fs * 8)) + if (max_data_bytes < st->silk_mode.bitRate*frame_size / (st->Fs * 4)) st->silk_mode.bitRate = max_data_bytes*st->Fs*4/frame_size; st->silk_mode.payloadSize_ms = 1000 * frame_size / st->Fs;