From 824b821caa4507ea46b3685cfcf37cfe7b322279 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 6 Feb 2015 06:07:43 +1100 Subject: [PATCH] netclock: Make the RTT average ignore large values more forcefully. Smooth larger RTTs a little harder, so excessively large values perturb the average a bit less, and therefore get filtered out more strongly --- libs/gst/net/gstnetclientclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/gst/net/gstnetclientclock.c b/libs/gst/net/gstnetclientclock.c index 2d8f0d5dbb..f8caec1bbe 100644 --- a/libs/gst/net/gstnetclientclock.c +++ b/libs/gst/net/gstnetclientclock.c @@ -351,7 +351,7 @@ gst_net_client_clock_observe_times (GstNetClientClock * self, else if (rtt < priv->rtt_avg) /* Shorter RTTs carry more weight than longer */ priv->rtt_avg = (3 * priv->rtt_avg + rtt) / 4; else - priv->rtt_avg = (7 * priv->rtt_avg + rtt) / 8; + priv->rtt_avg = (15 * priv->rtt_avg + rtt) / 16; if (rtt > 2 * priv->rtt_avg) { GST_LOG_OBJECT (self,