aggregator: Wait for the minimum latency, not the maximum
authorSebastian Dröge <sebastian@centricular.com>
Sat, 27 Dec 2014 08:42:57 +0000 (09:42 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 2 Dec 2017 15:10:26 +0000 (15:10 +0000)
The minimum latency is the latency we have to wait at least
to guarantee that all upstreams have produced data. The maximum
latency has no meaning like that and shouldn't be used for waiting.

libs/gst/base/gstaggregator.c

index fbd088c..bb8924e 100644 (file)
@@ -539,9 +539,7 @@ _wait_and_check (GstAggregator * self, gboolean * timeout)
 
     time = base_time + start;
 
-    if (GST_CLOCK_TIME_IS_VALID (latency_max)) {
-      time += latency_max;
-    } else if (GST_CLOCK_TIME_IS_VALID (latency_min)) {
+    if (GST_CLOCK_TIME_IS_VALID (latency_min)) {
       time += latency_min;
     } else {
       time += self->latency;