From a2254a496892e989eef50222f0cca80ae15f109d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 17 Apr 2024 13:53:21 +0200 Subject: [PATCH] ges-launcher: Fix for forcing container profiles If the input profile doesn't have a container, it's fine since we are overriding it. Just add the elementary stream to the target container profile Part-of: --- .../gst-editing-services/tools/ges-launcher.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-editing-services/tools/ges-launcher.c b/subprojects/gst-editing-services/tools/ges-launcher.c index fba897849c..fbe22f356a 100644 --- a/subprojects/gst-editing-services/tools/ges-launcher.c +++ b/subprojects/gst-editing-services/tools/ges-launcher.c @@ -671,12 +671,20 @@ _set_rendering_details (GESLauncher * self) goto done; } - for (tmp = (GList *) - gst_encoding_container_profile_get_profiles - (GST_ENCODING_CONTAINER_PROFILE (prof)); tmp; tmp = tmp->next) { + /* Existing profile is a single-elementary-stream profile, put it in the + * new target container profile */ + if (!GST_IS_ENCODING_CONTAINER_PROFILE (prof)) { gst_encoding_container_profile_add_profile (GST_ENCODING_CONTAINER_PROFILE (new_prof), - GST_ENCODING_PROFILE (gst_encoding_profile_ref (tmp->data))); + GST_ENCODING_PROFILE (gst_encoding_profile_ref (prof))); + } else { + for (tmp = (GList *) + gst_encoding_container_profile_get_profiles + (GST_ENCODING_CONTAINER_PROFILE (prof)); tmp; tmp = tmp->next) { + gst_encoding_container_profile_add_profile + (GST_ENCODING_CONTAINER_PROFILE (new_prof), + GST_ENCODING_PROFILE (gst_encoding_profile_ref (tmp->data))); + } } gst_encoding_profile_unref (prof);