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.
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;