]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
check the jitter stats after the jitter buffer when its enabled
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 28 Feb 2014 21:50:12 +0000 (02:50 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 28 Feb 2014 21:50:17 +0000 (02:50 +0500)
src/switch_rtp.c

index d408a69be4b1418d6d0182a42030858785927561..ba2e11e562a7f6a7aa4f2c60cd1778472d640b17 100644 (file)
@@ -1704,7 +1704,7 @@ static void check_jitter(switch_rtp_t *rtp_session)
 
        diff_time = (current_time - rtp_session->stats.inbound.last_proc_time);
        seq = (int)(uint16_t) ntohs((uint16_t) rtp_session->recv_msg.header.seq);
-       
+
        /* Burst and Packet Loss */
        rtp_session->stats.inbound.recved++;
 
@@ -4466,13 +4466,13 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
                rtp_session->missed_count = 0;
        }
 
-
-       if (*bytes > rtp_header_len && (rtp_session->recv_msg.header.version == 2 && check_recv_payload(rtp_session))) {
-               xcheck_jitter = *bytes;
-               check_jitter(rtp_session);
+       if (!rtp_session->jb || rtp_session->pause_jb || !jb_valid(rtp_session)) {
+               if (*bytes > rtp_header_len && (rtp_session->recv_msg.header.version == 2 && check_recv_payload(rtp_session))) {
+                       xcheck_jitter = *bytes;
+                       check_jitter(rtp_session);
+               }
        }
 
-
        if (check_rtcp_and_ice(rtp_session) == -1) {
                return SWITCH_STATUS_GENERR;
        }