From 7e1fd3b0693ef5ae42be7b1286ca02c77378e367 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 10 Dec 2024 23:42:56 -0300 Subject: [PATCH] validate: scenario: Reset the pipeline on expected ERROR messages while executing actions Otherwise the scenario gets into an inconsistent state and users won't be able to properly recover. Part-of: --- .../validate/gst/validate/gst-validate-scenario.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 a0e70d38f9..38345e27ee 100644 --- a/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c +++ b/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c @@ -5222,7 +5222,13 @@ handle_bus_message (MessageData * d) GST_VALIDATE_REPORT_ACTION (scenario, act, SCENARIO_ACTION_EXECUTION_ERROR, "Error message happened while executing action"); + if (scenario->priv->changing_state) { + gst_element_set_state (pipeline, GST_STATE_NULL); + } + act->priv->state = GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED; gst_validate_action_set_done (act); + gst_bus_set_flushing (scenario->priv->bus, TRUE); + gst_bus_set_flushing (scenario->priv->bus, FALSE); gst_validate_action_unref (act); }