From 38dbfc1c24a40530cd21a9ea1f0d9b5b29daa015 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 20 Feb 2020 12:22:19 -0300 Subject: [PATCH] ges: Allow setting children property using the set_object_arg format This make it much simpler for the user to set enum values and should not cause any issue --- ges/ges-timeline-element.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ges/ges-timeline-element.c b/ges/ges-timeline-element.c index 4764cee2ff..21ff79f8a4 100644 --- a/ges/ges-timeline-element.c +++ b/ges/ges-timeline-element.c @@ -119,7 +119,11 @@ static void _set_child_property (GESTimelineElement * self G_GNUC_UNUSED, GObject * child, GParamSpec * pspec, GValue * value) { - g_object_set_property (child, pspec->name, value); + if (G_VALUE_TYPE (value) != pspec->value_type + && G_VALUE_TYPE (value) == G_TYPE_STRING) + gst_util_set_object_arg (child, pspec->name, g_value_get_string (value)); + else + g_object_set_property (child, pspec->name, value); } static gboolean