timeline: fix layer priority argument in trim

Previously, we tested that the given priority was `>0`, when it seems
that `>=0` was intended. A priority of `-1` means leave the priority
unchanged, whilst a priority of 0, or more, means move to this layer
priority.
This commit is contained in:
Henry Wilkes 2020-02-27 16:08:45 +00:00 committed by Thibault Saunier
parent bbff08f078
commit a8458d59de

View file

@ -1140,9 +1140,9 @@ timeline_trim_object (GESTimeline * timeline, GESTimelineElement * object,
}
return timeline_tree_trim (timeline->priv->tree,
GES_TIMELINE_ELEMENT (object), new_layer_priority > 0 ? (gint64)
GES_TIMELINE_ELEMENT (object), new_layer_priority < 0 ? 0 : (gint64)
ges_timeline_element_get_layer_priority (GES_TIMELINE_ELEMENT (object)) -
new_layer_priority : 0, edge == GES_EDGE_END ? GST_CLOCK_DIFF (position,
new_layer_priority, edge == GES_EDGE_END ? GST_CLOCK_DIFF (position,
_START (object) + _DURATION (object)) : GST_CLOCK_DIFF (position,
GES_TIMELINE_ELEMENT_START (object)), edge,
timeline->priv->snapping_distance);