From 351182ba2a1c4ccf357edc8e50e431cb1cab99d8 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 17 Jun 2019 18:23:07 -0400 Subject: [PATCH] nle: Parent the GstTask to ourself This allows accessing the nlecomposition in gdb when a task is 'dangling' making debugging easier. --- plugins/nle/nlecomposition.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/nle/nlecomposition.c b/plugins/nle/nlecomposition.c index abd145e..1aea0b5 100644 --- a/plugins/nle/nlecomposition.c +++ b/plugins/nle/nlecomposition.c @@ -444,6 +444,8 @@ _start_task (NleComposition * comp) gst_task_set_lock (task, GET_TASK_LOCK (comp)); GST_DEBUG_OBJECT (comp, "created task %p", task); comp->task = task; + gst_object_set_parent (GST_OBJECT (task), GST_OBJECT (comp)); + gst_object_unref (task); g_free (taskname); } @@ -479,7 +481,7 @@ _stop_task (NleComposition * comp) if (!gst_task_join (task)) goto join_failed; - gst_object_unref (task); + gst_object_unparent (GST_OBJECT (task)); return res; -- 2.7.4