This commit is contained in:
Anthony Minessale 2016-09-12 12:04:21 -05:00
parent 5c43a17a04
commit f3b22f6142
1 changed files with 5 additions and 1 deletions

View File

@ -1693,7 +1693,11 @@ static void check_jitter(switch_rtp_t *rtp_session)
rtp_session->stats.inbound.jitter_n++;
rtp_session->stats.inbound.jitter_add += diff_time;
if (rtp_session->stats.inbound.mean_interval) {
cur_diff = (int64_t)(diff_time - rtp_session->stats.inbound.mean_interval);
} else {
cur_diff = 0;
}
rtp_session->stats.inbound.jitter_addsq += (cur_diff * cur_diff);
rtp_session->stats.inbound.last_proc_time = current_time;