ges: gst_bin_add() is `transfer floating` so wrappers around it are too
authorSebastian Dröge <sebastian@centricular.com>
Wed, 4 Jan 2023 10:21:22 +0000 (12:21 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 4 Jan 2023 10:22:45 +0000 (10:22 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3678>

subprojects/gst-editing-services/ges/ges-pipeline.c
subprojects/gst-editing-services/ges/ges-timeline.c

index c33f408..f68a474 100644 (file)
@@ -987,7 +987,7 @@ _unlink_track (GESPipeline * self, GESTrack * track)
 /**
  * ges_pipeline_set_timeline:
  * @pipeline: A #GESPipeline
- * @timeline: (transfer full): The timeline to set for @pipeline
+ * @timeline: (transfer floating): The timeline to set for @pipeline
  *
  * Takes the given timeline and sets it as the #GESPipeline:timeline for
  * the pipeline.
index eb6f109..6cff17e 100644 (file)
@@ -2473,7 +2473,7 @@ ges_timeline_remove_layer (GESTimeline * timeline, GESLayer * layer)
 /**
  * ges_timeline_add_track:
  * @timeline: The #GESTimeline
- * @track: (transfer full): The track to add
+ * @track: (transfer floating): The track to add
  *
  * Add a track to the timeline.
  *
@@ -2510,6 +2510,8 @@ ges_timeline_add_track (GESTimeline * timeline, GESTrack * track)
   if (G_UNLIKELY (g_list_find (timeline->tracks, (gconstpointer) track))) {
     UNLOCK_DYN (timeline);
     GST_WARNING ("Track is already controlled by this timeline");
+    gst_object_ref_sink (track);
+    gst_object_unref (track);
     return FALSE;
   }