From 5dd1dfdadc3e327adb7bf2b76b5a51e24aa341dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 22 Dec 2014 15:26:37 +0100 Subject: [PATCH] aggregator: Post a latency message if the value of the latency property changes --- gst-libs/gst/base/gstaggregator.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst-libs/gst/base/gstaggregator.c b/gst-libs/gst/base/gstaggregator.c index 887efbc8c5..58a134bddb 100644 --- a/gst-libs/gst/base/gstaggregator.c +++ b/gst-libs/gst/base/gstaggregator.c @@ -1431,6 +1431,8 @@ gst_aggregator_dispose (GObject * object) static void gst_aggregator_set_latency_property (GstAggregator * self, gint64 latency) { + gboolean changed; + g_return_if_fail (GST_IS_AGGREGATOR (self)); GST_OBJECT_LOCK (self); @@ -1445,8 +1447,13 @@ gst_aggregator_set_latency_property (GstAggregator * self, gint64 latency) latency = self->priv->latency_max; } + changed = self->latency != latency; self->latency = latency; GST_OBJECT_UNLOCK (self); + + if (changed) + gst_element_post_message (GST_ELEMENT_CAST (self), + gst_message_new_latency (GST_OBJECT_CAST (self))); } /*