From 86c2681da669968c13d160535803492d09388ca6 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 9 Apr 2020 10:42:03 -0400 Subject: [PATCH] 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 --- ges/ges-timeline.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index bf0559d831..ab65978a65 100644 --- a/ges/ges-timeline.c +++ b/ges/ges-timeline.c @@ -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; -- 2.34.1