mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
ges-launcher: don't leak project uri string
ges_project_get_uri returns a cloned string so it should be free'd after usage. Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com> Reviewed-by: Thibault Saunier <thibault.saunier@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D381
This commit is contained in:
parent
fff6a73735
commit
f8f3444daf
1 changed files with 6 additions and 2 deletions
|
@ -146,6 +146,7 @@ static void
|
|||
_project_loaded_cb (GESProject * project, GESTimeline * timeline,
|
||||
GESLauncher * self)
|
||||
{
|
||||
gchar *project_uri = NULL;
|
||||
ParsedOptions *opts = &self->priv->parsed_options;
|
||||
GST_INFO ("Project loaded, playing it");
|
||||
|
||||
|
@ -174,9 +175,10 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
|
|||
}
|
||||
}
|
||||
|
||||
_timeline_set_user_options (self, timeline, ges_project_get_uri (project));
|
||||
project_uri = ges_project_get_uri (project);
|
||||
_timeline_set_user_options (self, timeline, project_uri);
|
||||
|
||||
if (self->priv->parsed_options.load_path && ges_project_get_uri (project)
|
||||
if (self->priv->parsed_options.load_path && project_uri
|
||||
&& ges_validate_activate (GST_PIPELINE (self->priv->pipeline),
|
||||
opts->scenario, &opts->needs_set_state) == FALSE) {
|
||||
g_error ("Could not activate scenario %s", opts->scenario);
|
||||
|
@ -184,6 +186,8 @@ _project_loaded_cb (GESProject * project, GESTimeline * timeline,
|
|||
g_application_quit (G_APPLICATION (self));
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue