From: Thibault Saunier Date: Tue, 30 Jun 2015 21:13:28 +0000 (+0200) Subject: clip: Fix track element priority computation X-Git-Tag: 1.19.3~493^2~1176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7dbdd27babbb6dbf1379944221e25fb5a496bae;p=platform%2Fupstream%2Fgstreamer.git clip: Fix track element priority computation We were computing the priority offset taking the global MIN_NLE_PRIO (which is a constant == 2 to make space for the mixing elements) instead of the layer 'track element' relative priority, leading to very big offsets on layer with a prio > 0. In the end it leaded to effects having the same priority as the sources which leads to an undefined behaviour in NLE. --- diff --git a/ges/ges-clip.c b/ges/ges-clip.c index 6e97824..380a32d 100644 --- a/ges/ges-clip.c +++ b/ges/ges-clip.c @@ -223,10 +223,14 @@ _set_priority (GESTimelineElement * element, guint32 priority) for (tmp = container->children; tmp; tmp = g_list_next (tmp)) { guint32 real_tck_prio; GESTimelineElement *child = (GESTimelineElement *) tmp->data; - gint off = _PRIORITY (child) - _PRIORITY (element) - MIN_NLE_PRIO; + gint off = _PRIORITY (child) - _PRIORITY (element) - min_prio; - if (off >= LAYER_HEIGHT) + if (off >= LAYER_HEIGHT) { + GST_ERROR ("%s child %s as a priority offset %d >= LAYER_HEIGHT %d" + "clamping it to 0", GES_TIMELINE_ELEMENT_NAME (element), + GES_TIMELINE_ELEMENT_NAME (child), off, LAYER_HEIGHT); off = 0; + } real_tck_prio = min_prio + priority + off;