container: Fix the way we check priority of subclasses when grouping objects

The resulting list was from lower to higher, we need the contrary
This commit is contained in:
Thibault Saunier 2013-06-25 18:34:44 -04:00 committed by Mathieu Duponchelle
parent ab98f370c8
commit 4020ca54ff

View file

@ -129,12 +129,13 @@ compare_grouping_prio (GType * a, GType * b)
GObjectClass *aclass = g_type_class_ref (*a);
GObjectClass *bclass = g_type_class_ref (*b);
/* We want higher prios to be first */
if (GES_CONTAINER_CLASS (aclass)->grouping_priority <
GES_CONTAINER_CLASS (bclass)->grouping_priority)
ret = -1;
ret = 1;
else if (GES_CONTAINER_CLASS (aclass)->grouping_priority >
GES_CONTAINER_CLASS (bclass)->grouping_priority)
ret = 1;
ret = -1;
g_type_class_unref (aclass);
g_type_class_unref (bclass);