]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8130 don't set packet loss percent
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 11 Sep 2015 16:37:01 +0000 (11:37 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 11 Sep 2015 16:37:01 +0000 (11:37 -0500)
src/mod/codecs/mod_opus/mod_opus.c

index c38a92c4704f5a5fa2f7ce04fe80066317dd579a..864b9fb3b609762a6efa6748e6dff12a58320e9b 100644 (file)
@@ -819,6 +819,10 @@ static switch_status_t switch_opus_control(switch_codec_t *codec,
                        calc = plpct % 10;
                        plpct = plpct - calc + ( calc ? 10 : 0);
 
+                       if (opus_prefs.plpct > 0 && plpct < opus_prefs.plpct) {
+                               plpct = opus_prefs.plpct;
+                       }
+
                        if (plpct != context->old_plpct) {
                                opus_encoder_ctl(context->encoder_object, OPUS_SET_PACKET_LOSS_PERC(plpct));