ges: Make sure not to set transition start to negative

gnlobject.start is a guint64, we can not set it to a negative value
This commit is contained in:
Thibault Saunier 2011-12-06 18:04:11 -03:00
parent 7212307db5
commit 2fe6210383

View file

@ -163,7 +163,7 @@ static void
gstl_recalculate (GESSimpleTimelineLayer * self)
{
GList *tmp;
GstClockTime pos = 0;
gint64 pos = 0;
gint priority = 0;
gint transition_priority = 0;
gint height;
@ -210,9 +210,11 @@ gstl_recalculate (GESSimpleTimelineLayer * self)
} else if (GES_IS_TIMELINE_TRANSITION (obj)) {
pos -= dur;
if (pos < 0)
pos = 0;
GST_LOG ("%p obj: height: %d: trans_priority %d", obj, height,
transition_priority);
GST_LOG ("%p obj: height: %d: trans_priority %d Position: %d, "
"duration %d", obj, height, transition_priority, pos);
g_assert (transition_priority != -1);