mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
GESFormatter: Plug a leak
And make the two save methods have the same code/look
This commit is contained in:
parent
f07daf3beb
commit
6476d50b2c
1 changed files with 8 additions and 5 deletions
|
@ -312,6 +312,7 @@ ges_formatter_save (GESFormatter * formatter, GESTimeline * timeline)
|
|||
GList *layers;
|
||||
|
||||
/* Saving an empty timeline is not allowed */
|
||||
/* FIXME : Having a ges_timeline_is_empty() would be more efficient maybe */
|
||||
layers = ges_timeline_get_layers (timeline);
|
||||
|
||||
g_return_val_if_fail (layers != NULL, FALSE);
|
||||
|
@ -404,19 +405,21 @@ ges_formatter_save_to_uri (GESFormatter * formatter, GESTimeline *
|
|||
timeline, const gchar * uri)
|
||||
{
|
||||
GESFormatterClass *klass = GES_FORMATTER_GET_CLASS (formatter);
|
||||
GList *layers, *tmp;
|
||||
|
||||
GList *layers;
|
||||
|
||||
/* Saving an empty timeline is not allowed */
|
||||
/* FIXME : Having a ges_timeline_is_empty() would be more efficient maybe */
|
||||
layers = ges_timeline_get_layers (timeline);
|
||||
|
||||
g_return_val_if_fail (layers != NULL, FALSE);
|
||||
for (tmp = layers; tmp; tmp = g_list_next (tmp)) {
|
||||
g_object_unref (tmp);
|
||||
}
|
||||
g_list_foreach (layers, (GFunc) g_object_unref, NULL);
|
||||
g_list_free (layers);
|
||||
|
||||
if (klass->save_to_uri)
|
||||
return klass->save_to_uri (formatter, timeline, uri);
|
||||
|
||||
GST_ERROR ("not implemented!");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue