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 <amoizard@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Aymeric Moizard 2020-01-22 16:53:10 +01:00 committed by Anders Broman
parent db6c3b8e15
commit 6fceff7240
1 changed files with 3 additions and 3 deletions

View File

@ -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);