timeline: create_transitions_on_layer *before* actually commiting

Everything need to be in place before commiting, otherwize it makes no
sense at all.
This commit is contained in:
Mathieu Duponchelle 2013-06-29 00:17:31 +02:00 committed by Thibault Saunier
parent cc9391319e
commit 4addde8d74

View file

@ -2766,6 +2766,11 @@ ges_timeline_commit (GESTimeline * timeline)
GST_DEBUG_OBJECT (timeline, "commiting changes"); GST_DEBUG_OBJECT (timeline, "commiting changes");
for (tmp = timeline->layers; tmp; tmp = tmp->next) {
_create_transitions_on_layer (timeline, GES_LAYER (tmp->data),
NULL, NULL, _find_transition_from_auto_transitions);
}
for (tmp = timeline->tracks; tmp; tmp = tmp->next) { for (tmp = timeline->tracks; tmp; tmp = tmp->next) {
if (!ges_track_commit (GES_TRACK (tmp->data))) if (!ges_track_commit (GES_TRACK (tmp->data)))
res = FALSE; res = FALSE;
@ -2774,11 +2779,6 @@ ges_timeline_commit (GESTimeline * timeline)
/* Make sure we reset the context */ /* Make sure we reset the context */
timeline->priv->movecontext.needs_move_ctx = TRUE; timeline->priv->movecontext.needs_move_ctx = TRUE;
for (tmp = timeline->layers; tmp; tmp = tmp->next) {
_create_transitions_on_layer (timeline, GES_LAYER (tmp->data),
NULL, NULL, _find_transition_from_auto_transitions);
}
return res; return res;
} }