timeline: Plug a leak when calling enable_update

This commit is contained in:
Thibault Saunier 2012-01-20 16:37:28 -03:00
parent 7e7059d37d
commit 4b34d2bbb3

View file

@ -1241,21 +1241,16 @@ ges_timeline_is_updating (GESTimeline * timeline)
gboolean
ges_timeline_enable_update (GESTimeline * timeline, gboolean enabled)
{
GList *tmp, *tracks;
GList *tmp;
gboolean res = TRUE;
GST_DEBUG_OBJECT (timeline, "%s updates", enabled ? "Enabling" : "Disabling");
tracks = ges_timeline_get_tracks (timeline);
for (tmp = tracks; tmp; tmp = tmp->next) {
if (!ges_track_enable_update (tmp->data, enabled)) {
for (tmp = timeline->priv->tracks; tmp; tmp = tmp->next) {
if (!ges_track_enable_update (((TrackPrivate *) tmp->data)->track, enabled))
res = FALSE;
}
}
g_list_free (tracks);
return res;
}