diff options
author | Brendan Long <b.long@cablelabs.com> | 2013-10-30 17:02:35 -0500 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-02-06 22:50:53 +0100 |
commit | f85c1c46488abf2814c8ce51a892a4f5f9ab8b98 (patch) | |
tree | 6446b769e33ec83eb285f216419f0cfdc22a94f0 | |
parent | f6054722309c3702fbe40ccbf009b8f2cb37e4e2 (diff) |
gst: clear floating references for GstTask, GstTaskPool and GstCollectPads
https://bugzilla.gnome.org/show_bug.cgi?id=710342
-rw-r--r-- | gst/gsttask.c | 3 | ||||
-rw-r--r-- | gst/gsttaskpool.c | 2 | ||||
-rw-r--r-- | libs/gst/base/gstcollectpads.c | 3 |
3 files changed, 8 insertions, 0 deletions
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 |