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
This commit is contained in:
Jan Schmidt 2015-02-06 06:07:43 +11:00
parent 9d2b2768e3
commit 824b821caa

View file

@ -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 */ else if (rtt < priv->rtt_avg) /* Shorter RTTs carry more weight than longer */
priv->rtt_avg = (3 * priv->rtt_avg + rtt) / 4; priv->rtt_avg = (3 * priv->rtt_avg + rtt) / 4;
else 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) { if (rtt > 2 * priv->rtt_avg) {
GST_LOG_OBJECT (self, GST_LOG_OBJECT (self,