]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11080: [freeswitch-core] Auto sync of jb can fail on extreme loss #resolve
authorBrian West <brian@freeswitch.org>
Fri, 30 Mar 2018 19:07:36 +0000 (14:07 -0500)
committerMuteesa Fred <muteesafred@hotmail.com>
Tue, 24 Jul 2018 07:21:47 +0000 (07:21 +0000)
src/switch_core_media.c

index 84405c4e80f862d174b2c15040e73ae1bed36213..6d4b780df33efb3988c8977e00da053e4f29d6f6 100644 (file)
@@ -2513,10 +2513,16 @@ static void check_jb(switch_core_session_t *session, const char *input, int32_t
                        maxlen = (a_engine->read_codec.implementation->microseconds_per_packet / 1000) * abs(maxlen);
                }
 
+               
+               
                if (jb_msec < 10 || jb_msec > 10000) {
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,
-                                                         "Invalid Jitterbuffer spec [%d] must be between 10 and 10000\n", jb_msec);
-               } else {
+                       //switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,
+                       //"Invalid Jitterbuffer spec [%d] must be between 10 and 10000\n", jb_msec);
+                       jb_msec = (a_engine->read_codec.implementation->microseconds_per_packet / 1000) * 1;
+                       maxlen = jb_msec * 100;
+               }
+
+               if (jb_msec && maxlen) {
                        int qlen, maxqlen = 50;
 
                        qlen = jb_msec / (a_engine->read_impl.microseconds_per_packet / 1000);