FS-6209 don't change behavior from defaults if the values aren't defined

This commit is contained in:
Brian West 2014-02-27 15:29:25 -06:00
parent 26e96effe9
commit 4516668db9
1 changed files with 7 additions and 3 deletions

View File

@ -284,9 +284,13 @@ static switch_status_t switch_opus_init(switch_codec_t *codec, switch_codec_flag
opus_encoder_ctl(context->encoder_object, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_FULLBAND));
}
opus_encoder_ctl(context->encoder_object, OPUS_SET_VBR(use_vbr));
opus_encoder_ctl(context->encoder_object, OPUS_SET_COMPLEXITY(complexity));
if (use_vbr) {
opus_encoder_ctl(context->encoder_object, OPUS_SET_VBR(use_vbr));
}
if (complexity) {
opus_encoder_ctl(context->encoder_object, OPUS_SET_COMPLEXITY(complexity));
}
if (opus_codec_settings.useinbandfec) {
opus_encoder_ctl(context->encoder_object, OPUS_SET_INBAND_FEC(opus_codec_settings.useinbandfec));
}