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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6674>
This commit is contained in:
Edward Hervey 2024-04-17 13:53:21 +02:00
parent 26acd70c74
commit a2254a4968

View file

@ -671,6 +671,13 @@ _set_rendering_details (GESLauncher * self)
goto done;
}
/* 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 (prof)));
} else {
for (tmp = (GList *)
gst_encoding_container_profile_get_profiles
(GST_ENCODING_CONTAINER_PROFILE (prof)); tmp; tmp = tmp->next) {
@ -678,6 +685,7 @@ _set_rendering_details (GESLauncher * self)
(GST_ENCODING_CONTAINER_PROFILE (new_prof),
GST_ENCODING_PROFILE (gst_encoding_profile_ref (tmp->data)));
}
}
gst_encoding_profile_unref (prof);
prof = new_prof;