From f3b22f61423d85784ae8d610ea35f7516797555d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 12 Sep 2016 12:04:21 -0500 Subject: [PATCH] FS-9496 --- src/switch_rtp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index a2c4ebdc3e..0879ab63aa 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -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; - cur_diff = (int64_t)(diff_time - rtp_session->stats.inbound.mean_interval); + 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;