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.
pespin/rlcmac
Jirka Novak 1 year ago committed by Wireshark GitLab Utility
parent d4cad23807
commit a747639add
  1. 4
      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 ) {

Loading…
Cancel
Save