From: Sebastian Dröge Date: Fri, 6 Feb 2015 09:36:28 +0000 (+0100) Subject: aggregator: If upstream has no max latency but the subclass has, take the subclass... X-Git-Tag: 1.16.2~574^2~128 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07d9bf9cab1546a4b19ba4593bb2b29d9f9bb56e;hp=e57b62be72dc59e8799818427f6a6eb562064f81;p=platform%2Fupstream%2Fgstreamer.git aggregator: If upstream has no max latency but the subclass has, take the subclass max latency --- diff --git a/libs/gst/base/gstaggregator.c b/libs/gst/base/gstaggregator.c index 9f29bec..5fe1913 100644 --- a/libs/gst/base/gstaggregator.c +++ b/libs/gst/base/gstaggregator.c @@ -1163,8 +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)) - min += our_latency; + else if (GST_CLOCK_TIME_IS_VALID (self->priv->sub_latency_max)) + max = self->priv->sub_latency_max; if (live) *live = self->priv->latency_live; @@ -1221,6 +1221,8 @@ gst_aggregator_query_latency (GstAggregator * self, GstQuery * query) if (GST_CLOCK_TIME_IS_VALID (self->priv->sub_latency_max) && GST_CLOCK_TIME_IS_VALID (data.max)) data.max += self->priv->sub_latency_max; + else if (GST_CLOCK_TIME_IS_VALID (self->priv->sub_latency_max)) + data.max = self->priv->sub_latency_max; if (data.live && GST_CLOCK_TIME_IS_VALID (our_latency) && data.min > data.max) { GST_ELEMENT_WARNING (self, CORE, NEGOTIATION,