From 6fceff7240be28fdd0fc4e767b9e1c7318f446d4 Mon Sep 17 00:00:00 2001 From: Aymeric Moizard Date: Wed, 22 Jan 2020 16:53:10 +0100 Subject: [PATCH] RTP Stream Analysis: fix wrong values for clock drift and freq drift. The drift values should use the relative time (arrivaltime) instead of the absolute time (current_time) otherwise, the values are wrong. Bug: 16343 Change-Id: Icdc65476ab68ce51088314b7c9de939c86472ae9 Reviewed-on: https://code.wireshark.org/review/35908 Reviewed-by: Aymeric Moizard Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/tap-rtp-analysis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/tap-rtp-analysis.c b/ui/tap-rtp-analysis.c index 876cc18957..d86a0f0693 100644 --- a/ui/tap-rtp-analysis.c +++ b/ui/tap-rtp-analysis.c @@ -379,10 +379,10 @@ rtppacket_analyse(tap_rtp_stat_t *statinfo, } #endif /* Gather data for calculation of skew least square */ - statinfo->sumt += 1.0 * current_time; + statinfo->sumt += 1.0 * arrivaltime; statinfo->sumTS += 1.0 * nominaltime; - statinfo->sumt2 += 1.0 * current_time * current_time; - statinfo->sumtTS += 1.0 * current_time * nominaltime; + statinfo->sumt2 += 1.0 * arrivaltime * arrivaltime; + statinfo->sumtTS += 1.0 * arrivaltime * nominaltime; } else { if (!statinfo->first_packet) { statinfo->delta = current_time-(statinfo->time);