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.
This commit is contained in:
parent
d4cad23807
commit
a747639add
|
@ -165,7 +165,7 @@ rtppacket_analyse(tap_rtp_stat_t *statinfo,
|
||||||
const struct _rtp_info *rtpinfo)
|
const struct _rtp_info *rtpinfo)
|
||||||
{
|
{
|
||||||
double current_time;
|
double current_time;
|
||||||
double current_jitter;
|
double current_jitter = 0;
|
||||||
double current_diff = 0;
|
double current_diff = 0;
|
||||||
double nominaltime;
|
double nominaltime;
|
||||||
double arrivaltime; /* Time relative to start_time */
|
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
|
* handled, that logic increments total_nr from 0 to 1; here, it is
|
||||||
* always >=1 .
|
* 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 */
|
/* Minimum jitter calculation */
|
||||||
if (statinfo->min_jitter == -1 ) {
|
if (statinfo->min_jitter == -1 ) {
|
||||||
|
|
Loading…
Reference in New Issue