From 4846f06b417002b7373e28032f22452bd7a72df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 27 Dec 2014 09:42:57 +0100 Subject: [PATCH] aggregator: Wait for the minimum latency, not the maximum 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/gst/base/gstaggregator.c b/libs/gst/base/gstaggregator.c index fbd088c0af..bb8924e159 100644 --- a/libs/gst/base/gstaggregator.c +++ b/libs/gst/base/gstaggregator.c @@ -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;