Commit fe964056 authored by Thibault Saunier's avatar Thibault Saunier 🌵
Browse files

validate: Tear down pipeline when openning a new project

Avoiding potential deadlock when we remove tracks on a playing pipeline
parent 64bb85e6
......@@ -758,6 +758,7 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
static gboolean
_load_project (GstValidateScenario * scenario, GstValidateAction * action)
{
GstState state;
GESProject *project;
GList *tmp, *tmp_full;
......@@ -780,6 +781,8 @@ _load_project (GstValidateScenario * scenario, GstValidateAction * action)
goto fail;
}
gst_element_get_state (pipeline, &state, NULL, 0);
gst_element_set_state (pipeline, GST_STATE_NULL);
content = gst_structure_get_string (action->structure, "serialized-content");
if (content) {
......@@ -834,6 +837,8 @@ _load_project (GstValidateScenario * scenario, GstValidateAction * action)
goto fail;
}
gst_element_set_state (pipeline, state);
done:
if (error)
g_error_free (error);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment