validate: scenario: Clear wait_message_action on stop
When executing a stop action, ensure that any pending wait_message_action is cleared and unreffed to prevent it from being executed after the scenario has been stopped. This prevents potential crashes or unexpected behavior when stopping a scenario that has a pending wait action. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9013>
This commit is contained in:
parent
fe6ad6f370
commit
efdc9b1aea
@ -7135,6 +7135,12 @@ _execute_stop (GstValidateScenario * scenario, GstValidateAction * action)
|
||||
}
|
||||
scenario->priv->has_stopped = TRUE;
|
||||
|
||||
if (scenario->priv->wait_message_action) {
|
||||
// Clear the wait action so that it is not executed
|
||||
gst_validate_action_unref (scenario->priv->wait_message_action);
|
||||
scenario->priv->wait_message_action = NULL;
|
||||
}
|
||||
|
||||
if (scenario->priv->actions || scenario->priv->non_blocking_running_actions ||
|
||||
scenario->priv->on_addition_actions) {
|
||||
guint nb_actions = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user