aggregator: Don't add the latency property to the max latency
authorSebastian Dröge <sebastian@centricular.com>
Fri, 6 Feb 2015 09:30:59 +0000 (10:30 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 2 Dec 2017 15:10:26 +0000 (15:10 +0000)
It has no meaning for the max latency and is only used to increase the min
latency.

libs/gst/base/gstaggregator.c

index e9056e3..44cf295 100644 (file)
@@ -1163,11 +1163,8 @@ gst_aggregator_get_latency_unlocked (GstAggregator * self, gboolean * live,
     max += self->priv->sub_latency_max;
 
   our_latency = self->priv->latency;
-  if (GST_CLOCK_TIME_IS_VALID (our_latency)) {
+  if (GST_CLOCK_TIME_IS_VALID (our_latency))
     min += our_latency;
-    if (GST_CLOCK_TIME_IS_VALID (max))
-      max += our_latency;
-  }
 
   if (live)
     *live = self->priv->latency_live;
@@ -1226,8 +1223,6 @@ gst_aggregator_query_latency (GstAggregator * self, GstQuery * query)
   if (GST_CLOCK_TIME_IS_VALID (our_latency)) {
     if (GST_CLOCK_TIME_IS_VALID (data.min))
       data.min += our_latency;
-    if (GST_CLOCK_TIME_IS_VALID (data.max))
-      data.max += our_latency;
   }
 
   if (GST_CLOCK_TIME_IS_VALID (self->priv->sub_latency_min)