validate: scenario: Fix NULL context usage in action done callback
Use the local context variable that was retrieved earlier instead of action->priv->context which is always NULL at this point since we reset it right before. This ensures we invoke the callback on the correct context. And make sure that the wait message still has a reference when setting done otherwise it is unref before calling the context invoke function Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
This commit is contained in:
parent
f99bf2abee
commit
fe6ad6f370
@ -5054,7 +5054,11 @@ _check_waiting_for_message (GstValidateScenario * scenario,
|
||||
}
|
||||
}
|
||||
|
||||
gst_validate_action_set_done (priv->wait_message_action);
|
||||
GstValidateAction *action =
|
||||
gst_validate_action_ref (priv->wait_message_action);
|
||||
gst_validate_action_set_done (action);
|
||||
gst_validate_action_unref (action);
|
||||
|
||||
_add_execute_actions_gsource (scenario);
|
||||
}
|
||||
|
||||
@ -7324,7 +7328,7 @@ gst_validate_action_set_done (GstValidateAction * action)
|
||||
}
|
||||
gst_clear_object (&scenario);
|
||||
|
||||
g_main_context_invoke_full (action->priv->context,
|
||||
g_main_context_invoke_full (context,
|
||||
G_PRIORITY_DEFAULT_IDLE,
|
||||
(GSourceFunc) _action_set_done,
|
||||
gst_validate_action_ref (action),
|
||||
|
Loading…
x
Reference in New Issue
Block a user