validate: Tear down pipeline when openning a new project

Avoiding potential deadlock when we remove tracks on a playing pipeline
This commit is contained in:
Thibault Saunier 2019-10-22 11:53:36 +02:00
parent 64bb85e6a1
commit fe96405692

View file

@ -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);