From c275b5c6786e29d22830929033583bba69c46594 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Wed, 2 Mar 2022 10:27:10 +0000 Subject: [PATCH] validate: Keep scenario alive enough when executing actions Part-of: --- .../gst-devtools/validate/gst/validate/gst-validate-scenario.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c b/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c index 896d5c3..4bb0d88 100644 --- a/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c +++ b/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c @@ -2169,11 +2169,15 @@ _add_execute_actions_gsource (GstValidateScenario * scenario) && priv->signal_handler_id == 0 && priv->wait_message_action == NULL) { if (!scenario->priv->action_execution_interval) priv->execute_actions_source_id = - g_idle_add ((GSourceFunc) execute_next_action, scenario); + g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, + (GSourceFunc) execute_next_action, + gst_object_ref (GST_OBJECT_CAST (scenario)), gst_object_unref); else priv->execute_actions_source_id = - g_timeout_add (scenario->priv->action_execution_interval, - (GSourceFunc) execute_next_action, scenario); + g_timeout_add_full (G_PRIORITY_DEFAULT, + scenario->priv->action_execution_interval, + (GSourceFunc) execute_next_action, + gst_object_ref (GST_OBJECT_CAST (scenario)), gst_object_unref); SCENARIO_UNLOCK (scenario); GST_DEBUG_OBJECT (scenario, "Start checking position again"); -- 2.7.4