diff --git a/ges/ges-clip.c b/ges/ges-clip.c index b40ac9fc95..c0e8a0e8fa 100644 --- a/ges/ges-clip.c +++ b/ges/ges-clip.c @@ -95,7 +95,7 @@ _get_priority_range (GESContainer * container, guint32 * min_priority, *min_priority = layer->min_gnl_priority; *max_priority = layer->max_gnl_priority; } else { - *min_priority = 0; + *min_priority = MIN_GNL_PRIO; *max_priority = G_MAXUINT32; } } diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index 59d9aa22ff..378f728cd9 100644 --- a/ges/ges-timeline.c +++ b/ges/ges-timeline.c @@ -2206,7 +2206,8 @@ trackelement_priority_changed_cb (GESTrackElement * child, GST_ERROR_OBJECT (timeline, "Changing a TrackElement prio, which would not " "land in no layer we are controlling"); - g_sequence_remove (iters->iter_by_layer); + if (iters->iter_by_layer) + g_sequence_remove (iters->iter_by_layer); iters->iter_by_layer = NULL; iters->layer = NULL; } else { diff --git a/tests/check/ges/clip.c b/tests/check/ges/clip.c index 873dc5051d..103ad9a414 100644 --- a/tests/check/ges/clip.c +++ b/tests/check/ges/clip.c @@ -460,21 +460,21 @@ GST_START_TEST (test_effects_priorities) fail_unless (ges_container_add (GES_CONTAINER (clip), GES_TIMELINE_ELEMENT (effect2))); - fail_unless_equals_int (0, _PRIORITY (effect)); - fail_unless_equals_int (1, _PRIORITY (effect1)); - fail_unless_equals_int (2, _PRIORITY (effect2)); + fail_unless_equals_int (MIN_GNL_PRIO + 0, _PRIORITY (effect)); + fail_unless_equals_int (MIN_GNL_PRIO + 1, _PRIORITY (effect1)); + fail_unless_equals_int (MIN_GNL_PRIO + 2, _PRIORITY (effect2)); fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect), 2)); - fail_unless_equals_int (0, _PRIORITY (effect1)); - fail_unless_equals_int (1, _PRIORITY (effect2)); - fail_unless_equals_int (2, _PRIORITY (effect)); + fail_unless_equals_int (MIN_GNL_PRIO + 0, _PRIORITY (effect1)); + fail_unless_equals_int (MIN_GNL_PRIO + 1, _PRIORITY (effect2)); + fail_unless_equals_int (MIN_GNL_PRIO + 2, _PRIORITY (effect)); fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect), 0)); - fail_unless_equals_int (0, _PRIORITY (effect)); - fail_unless_equals_int (1, _PRIORITY (effect1)); - fail_unless_equals_int (2, _PRIORITY (effect2)); + fail_unless_equals_int (MIN_GNL_PRIO + 0, _PRIORITY (effect)); + fail_unless_equals_int (MIN_GNL_PRIO + 1, _PRIORITY (effect1)); + fail_unless_equals_int (MIN_GNL_PRIO + 2, _PRIORITY (effect2)); gst_object_unref (timeline); }