ges: Cast to signed int to compare agasint 0

The check made sense but we were not casting to be able to check
signess of subtraction result.

CID: 1444923
This commit is contained in:
Thibault Saunier 2020-04-09 10:42:03 -04:00
parent d81548a28a
commit 86c2681da6

View file

@ -1163,12 +1163,14 @@ timeline_ripple_object (GESTimeline * timeline, GESTimelineElement * obj,
timeline->priv->needs_transitions_update = FALSE;
new_duration =
CLAMP (position - obj->start, 0, obj->maxduration - obj->inpoint);
CLAMP (GST_CLOCK_DIFF (obj->start, position), 0,
GST_CLOCK_TIME_IS_VALID (obj->
maxduration) ? GST_CLOCK_DIFF (obj->inpoint,
obj->maxduration) : GST_CLOCK_TIME_NONE);
res =
timeline_tree_ripple (timeline->priv->tree,
(gint64) GES_TIMELINE_ELEMENT_LAYER_PRIORITY (obj) -
(gint64) new_layer_priority,
_DURATION (obj) - new_duration, obj,
(gint64) new_layer_priority, _DURATION (obj) - new_duration, obj,
GES_EDGE_END, timeline->priv->snapping_distance);
timeline->priv->needs_transitions_update = TRUE;