From bf420a3a20ef3f8f3f51eac5e2be903ec42b0203 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 23 Oct 2023 11:23:14 -0300 Subject: [PATCH] ges: launcher: Commit timeline before setting state Ensuring that all operations related to commit are properly performed Part-of: --- subprojects/gst-editing-services/tools/ges-launcher.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-editing-services/tools/ges-launcher.c b/subprojects/gst-editing-services/tools/ges-launcher.c index 4b8368d974..6659f110d5 100644 --- a/subprojects/gst-editing-services/tools/ges-launcher.c +++ b/subprojects/gst-editing-services/tools/ges-launcher.c @@ -903,10 +903,12 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline, g_free (project_uri); - if (!self->priv->seenerrors && opts->needs_set_state && - gst_element_set_state (GST_ELEMENT (self->priv->pipeline), - GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { - g_error ("Failed to start the pipeline\n"); + if (!self->priv->seenerrors && opts->needs_set_state) { + ges_timeline_commit (self->priv->timeline); + if (gst_element_set_state (GST_ELEMENT (self->priv->pipeline), + GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { + g_error ("Failed to start the pipeline\n"); + } } }