mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
ges: launch: Enhance the way we detect explicitly added track
When using subtimeline serialized with the command line formatter syntax, we had a false positive when detecting if the user had explicitly specified tracks with the `+track` syntax. Verifying the presence of `+track` explicitly in the `args` array ensure the `+track` is not for a subtimeline. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5981>
This commit is contained in:
parent
8d58d2b43b
commit
4c8396da8e
1 changed files with 4 additions and 1 deletions
|
@ -95,6 +95,7 @@ sanitize_timeline_description (gchar ** args, GESLauncherParsedOptions * opts)
|
|||
gchar *prev_arg = NULL;
|
||||
GString *track_def;
|
||||
GString *timeline_str;
|
||||
gboolean adds_tracks = FALSE;
|
||||
|
||||
gchar *string = g_strdup (" ");
|
||||
|
||||
|
@ -104,6 +105,8 @@ sanitize_timeline_description (gchar ** args, GESLauncherParsedOptions * opts)
|
|||
|
||||
new_string = g_strconcat (string, " ", sanitized, NULL);
|
||||
|
||||
adds_tracks |= (g_strcmp0 (args[i], "+track") == 0);
|
||||
|
||||
g_free (sanitized);
|
||||
g_free (string);
|
||||
string = new_string;
|
||||
|
@ -116,7 +119,7 @@ sanitize_timeline_description (gchar ** args, GESLauncherParsedOptions * opts)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (strstr (string, "+track")) {
|
||||
if (adds_tracks) {
|
||||
gchar *res = g_strconcat ("ges:", string, NULL);
|
||||
g_free (string);
|
||||
|
||||
|
|
Loading…
Reference in a new issue