From 11d93367a91d832e1031d3c8c0cdccf2ddb89cd2 Mon Sep 17 00:00:00 2001 From: Henry Wilkes Date: Mon, 24 Feb 2020 18:58:55 +0000 Subject: [PATCH] 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 --- ges/ges-group.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ges/ges-group.c b/ges/ges-group.c index 4afb085..3d4edd6 100644 --- a/ges/ges-group.c +++ b/ges/ges-group.c @@ -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); } } -- 2.7.4