diff options
author | Jirka Novak <j.novak@netsystem.cz> | 2021-10-04 21:11:37 +0200 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-10-20 07:05:30 +0000 |
commit | a747639add4bcf0bc3391b27bfa4e28eaefe7d61 (patch) | |
tree | 8e623c7f363bc787091e5e907323e92421968a62 | |
parent | d4cad23807cd61a6ec7df7ff89ed2256807ae3f2 (diff) |
RTP Analysis: Fix of mean_jitter calculation
Calculation used current_diff in place current_jitter in mean_jitter
calculation so it produced incorrect results. This patch fixes it.
Closes #17600.
-rw-r--r-- | ui/tap-rtp-analysis.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/tap-rtp-analysis.c b/ui/tap-rtp-analysis.c index cb8c1d8933..15dc0ec158 100644 --- a/ui/tap-rtp-analysis.c +++ b/ui/tap-rtp-analysis.c @@ -165,7 +165,7 @@ rtppacket_analyse(tap_rtp_stat_t *statinfo, const struct _rtp_info *rtpinfo) { double current_time; - double current_jitter; + double current_jitter = 0; double current_diff = 0; double nominaltime; double arrivaltime; /* Time relative to start_time */ @@ -494,7 +494,7 @@ rtppacket_analyse(tap_rtp_stat_t *statinfo, * handled, that logic increments total_nr from 0 to 1; here, it is * always >=1 . */ - statinfo->mean_jitter = (statinfo->mean_jitter*(statinfo->total_nr-1) + current_diff) / statinfo->total_nr; + statinfo->mean_jitter = (statinfo->mean_jitter*(statinfo->total_nr-1) + current_jitter) / statinfo->total_nr; /* Minimum jitter calculation */ if (statinfo->min_jitter == -1 ) { |