From fe854bba6962898f8dd1b1fa7dc7b176244f4af0 Mon Sep 17 00:00:00 2001 From: Henry Wilkes Date: Mon, 6 Apr 2020 12:17:43 +0100 Subject: [PATCH] timeline: return sunk element on pasting Technically, an element can still be floating on the return from `->paste` (e.g. a clip not in a layer). Since the return of the `_paste` methods are (return full) a non-floating object is probably expected in all cases. --- ges/ges-timeline-element.c | 2 +- ges/ges-timeline.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ges/ges-timeline-element.c b/ges/ges-timeline-element.c index ade0134..1d082b8 100644 --- a/ges/ges-timeline-element.c +++ b/ges/ges-timeline-element.c @@ -2377,7 +2377,7 @@ ges_timeline_element_paste (GESTimelineElement * self, g_clear_object (&self->priv->copied_from); - return res ? g_object_ref (res) : res; + return res ? g_object_ref_sink (res) : res; } /** diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index af1ce6e..48563ff 100644 --- a/ges/ges-timeline.c +++ b/ges/ges-timeline.c @@ -3035,7 +3035,7 @@ ges_timeline_paste_element (GESTimeline * timeline, gst_object_unref (copied_from); - return res ? g_object_ref (res) : res; + return res ? g_object_ref_sink (res) : res; } /** -- 2.7.4