summaryrefslogtreecommitdiff
path: root/ges
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2015-03-19 09:32:25 +0100
committerThibault Saunier <tsaunier@gnome.org>2015-03-19 09:33:18 +0100
commit7d0015b973b689cfda027b2d65cf028b617cffa3 (patch)
tree8c38d0be57d2370c421b8325fa419a3144a541b2 /ges
parentdd47def4e313fac342bd941b77bf19afbc1dbc76 (diff)
ges: Fix build for older GLib
The return type of g_hash_table_insert changed from void to boolean
Diffstat (limited to 'ges')
-rw-r--r--ges/ges-timeline-element.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/ges/ges-timeline-element.c b/ges/ges-timeline-element.c
index 0ddd28d9..742d9da1 100644
--- a/ges/ges-timeline-element.c
+++ b/ges/ges-timeline-element.c
@@ -1197,21 +1197,26 @@ gboolean
ges_timeline_element_add_child_property (GESTimelineElement * self,
GParamSpec * pspec, GObject * child)
{
+ gchar *signame = g_strconcat ("notify::", pspec->name, NULL);
+
+ if (g_hash_table_contains (self->priv->children_props, pspec)) {
+ GST_INFO_OBJECT (self, "Child property already exists: %s", pspec->name);
+
+ return FALSE;
+ }
+
GST_DEBUG_OBJECT (self, "Adding child property: %" GST_PTR_FORMAT "::%s",
child, pspec->name);
- if (g_hash_table_insert (self->priv->children_props,
- g_param_spec_ref (pspec), gst_object_ref (child))) {
- gchar *signame = g_strconcat ("notify::", pspec->name, NULL);
+ g_hash_table_insert (self->priv->children_props,
+ g_param_spec_ref (pspec), gst_object_ref (child));
+ signame = g_strconcat ("notify::", pspec->name, NULL);
- g_signal_connect (child, signame, G_CALLBACK (child_prop_changed_cb), self);
+ g_signal_connect (child, signame, G_CALLBACK (child_prop_changed_cb), self);
- g_free (signame);
+ g_free (signame);
- return TRUE;
- }
-
- return FALSE;
+ return TRUE;
}
/**