From ba31a8d6a02ee617ea3c69941c1b11be37755d08 Mon Sep 17 00:00:00 2001 From: Henry Wilkes Date: Mon, 6 Apr 2020 12:26:11 +0100 Subject: [PATCH] timeline-element: only copy read-write properties Only copy the properties that can be both read and written, and are not construct only. Similarly for child properties when a track-element is deep copied. --- ges/ges-timeline-element.c | 3 ++- ges/ges-track-element.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ges/ges-timeline-element.c b/ges/ges-timeline-element.c index 1d082b862f..3498d8fca2 100644 --- a/ges/ges-timeline-element.c +++ b/ges/ges-timeline-element.c @@ -1679,7 +1679,8 @@ ges_timeline_element_copy (GESTimelineElement * self, gboolean deep) if (g_strcmp0 (specs[n]->name, "parent") && g_strcmp0 (specs[n]->name, "timeline") && g_strcmp0 (specs[n]->name, "name") && - (specs[n]->flags & G_PARAM_READWRITE) == G_PARAM_READWRITE) { + (specs[n]->flags & G_PARAM_READWRITE) == G_PARAM_READWRITE && + (specs[n]->flags & G_PARAM_CONSTRUCT_ONLY) == 0) { GValue v = G_VALUE_INIT; g_value_init (&v, specs[n]->value_type); g_object_get_property (G_OBJECT (self), specs[n]->name, &v); diff --git a/ges/ges-track-element.c b/ges/ges-track-element.c index ec7d178442..240d89cbb7 100644 --- a/ges/ges-track-element.c +++ b/ges/ges-track-element.c @@ -1470,7 +1470,9 @@ ges_track_element_copy_properties (GESTimelineElement * element, ges_track_element_list_children_properties (GES_TRACK_ELEMENT (element), &n_specs); for (n = 0; n < n_specs; ++n) { - if (!(specs[n]->flags & G_PARAM_WRITABLE)) + if ((specs[n]->flags & G_PARAM_READWRITE) != G_PARAM_READWRITE) + continue; + if (specs[n]->flags & G_PARAM_CONSTRUCT_ONLY) continue; g_value_init (&val, specs[n]->value_type); ges_track_element_get_child_property_by_pspec (GES_TRACK_ELEMENT (element),