From f85c1c46488abf2814c8ce51a892a4f5f9ab8b98 Mon Sep 17 00:00:00 2001 From: Brendan Long Date: Wed, 30 Oct 2013 17:02:35 -0500 Subject: [PATCH] gst: clear floating references for GstTask, GstTaskPool and GstCollectPads https://bugzilla.gnome.org/show_bug.cgi?id=710342 --- gst/gsttask.c | 3 +++ gst/gsttaskpool.c | 2 ++ libs/gst/base/gstcollectpads.c | 3 +++ 3 files changed, 8 insertions(+) diff --git a/gst/gsttask.c b/gst/gsttask.c index 993eb7094e..cf1decf043 100644 --- a/gst/gsttask.c +++ b/gst/gsttask.c @@ -197,6 +197,9 @@ gst_task_init (GstTask * task) g_mutex_lock (&pool_lock); task->priv->pool = gst_object_ref (klass->pool); g_mutex_unlock (&pool_lock); + + /* clear floating flag */ + gst_object_ref_sink (task); } static void diff --git a/gst/gsttaskpool.c b/gst/gsttaskpool.c index e08f2a3db6..4cb54f6176 100644 --- a/gst/gsttaskpool.c +++ b/gst/gsttaskpool.c @@ -141,6 +141,8 @@ gst_task_pool_class_init (GstTaskPoolClass * klass) static void gst_task_pool_init (GstTaskPool * pool) { + /* clear floating flag */ + gst_object_ref_sink (pool); } #ifndef GST_DISABLE_GST_DEBUG diff --git a/libs/gst/base/gstcollectpads.c b/libs/gst/base/gstcollectpads.c index 32c905f6ab..c5012084d1 100644 --- a/libs/gst/base/gstcollectpads.c +++ b/libs/gst/base/gstcollectpads.c @@ -265,6 +265,9 @@ gst_collect_pads_init (GstCollectPads * pads) pads->priv->seeking = FALSE; pads->priv->pending_flush_start = FALSE; pads->priv->pending_flush_stop = FALSE; + + /* clear floating flag */ + gst_object_ref_sink (pads); } static void