group: fix max layer priority

The maximum priority is `height - prio - 1`. Previously missing the -1.

Related to, but does not completely fix,
https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/91
This commit is contained in:
Henry Wilkes 2020-02-24 18:58:55 +00:00 committed by Thibault Saunier
parent f1d29e10e6
commit 11d93367a9

View file

@ -134,10 +134,7 @@ _update_our_values (GESGroup * group)
gint32 prio = _PRIORITY (child), height = GES_CONTAINER_HEIGHT (child);
min_layer_prio = MIN (prio, min_layer_prio);
/* FIXME: the height of the child = (max-priority - min-priority + 1)
* the priority of the child = min-priority
* so prio + height = max-priority + 1 */
max_layer_prio = MAX ((prio + height), max_layer_prio);
max_layer_prio = MAX ((prio + height - 1), max_layer_prio);
}
}