mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
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.
This commit is contained in:
parent
9669bafe46
commit
f7dbdd27ba
1 changed files with 6 additions and 2 deletions
|
@ -223,10 +223,14 @@ _set_priority (GESTimelineElement * element, guint32 priority)
|
||||||
for (tmp = container->children; tmp; tmp = g_list_next (tmp)) {
|
for (tmp = container->children; tmp; tmp = g_list_next (tmp)) {
|
||||||
guint32 real_tck_prio;
|
guint32 real_tck_prio;
|
||||||
GESTimelineElement *child = (GESTimelineElement *) tmp->data;
|
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;
|
off = 0;
|
||||||
|
}
|
||||||
|
|
||||||
real_tck_prio = min_prio + priority + off;
|
real_tck_prio = min_prio + priority + off;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue