timeline: Remove trackelements initating move from the moving context

They are handled specially when moving the context and having them
part of the context can lead to weird behaviours.

Fixes https://phabricator.freedesktop.org/T7693
This commit is contained in:
Thibault Saunier 2017-07-27 15:57:31 -04:00
parent daca7acf96
commit 487d9df367

View file

@ -1401,7 +1401,8 @@ ges_move_context_set_objects (GESTimeline * timeline, GESTrackElement * obj,
tmptrackelement = GES_TRACK_ELEMENT (g_sequence_get (iter));
tmpend = _START (tmptrackelement) + _DURATION (tmptrackelement);
if (tmpend <= start) {
if (tmpend <= start && GES_TIMELINE_ELEMENT_PARENT (tmptrackelement)
!= GES_TIMELINE_ELEMENT_PARENT (obj)) {
mv_ctx->max_trim_pos =
MAX (mv_ctx->max_trim_pos, _START (tmptrackelement));
mv_ctx->min_trim_pos = MAX (mv_ctx->min_trim_pos,
@ -1428,7 +1429,9 @@ ges_move_context_set_objects (GESTimeline * timeline, GESTrackElement * obj,
iter = g_sequence_iter_next (iter)) {
tmptrackelement = GES_TRACK_ELEMENT (g_sequence_get (iter));
if (_START (tmptrackelement) >= moving_point) {
if (_START (tmptrackelement) >= moving_point &&
GES_TIMELINE_ELEMENT_PARENT (tmptrackelement) !=
GES_TIMELINE_ELEMENT_PARENT (obj)) {
tmpend = _START (tmptrackelement) + _DURATION (tmptrackelement);
mv_ctx->max_trim_pos = MIN (mv_ctx->max_trim_pos, tmpend);
mv_ctx->moving_trackelements =