This commit is contained in:
Brandon Lewis 2010-05-28 11:42:29 +02:00 committed by Edward Hervey
parent 07693f56f8
commit 542e8afb75
2 changed files with 9 additions and 9 deletions

View file

@ -140,7 +140,7 @@ gstl_recalculate (GESSimpleTimelineLayer * self)
ges_timeline_object_set_priority (obj, priority - 1);
}
if (GES_TIMELINE_OBJECT_DURATION (prev_object) < dur) {
if (prev_object && (GES_TIMELINE_OBJECT_DURATION (prev_object) < dur)) {
GST_ERROR ("transition duration exceeds that of previous neighbor!");
}

View file

@ -201,12 +201,12 @@ GST_START_TEST (test_gsl_with_transitions)
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (source2),
GST_SECOND);
source3 = ges_custom_timeline_source_new (arbitrary_fill_track_func, ELEMENT);
g_object_set (source2, "duration", GST_SECOND, "start", (guint64) 42, NULL);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (source2),
g_object_set (source3, "duration", GST_SECOND, "start", (guint64) 42, NULL);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (source3),
GST_SECOND);
source4 = ges_custom_timeline_source_new (arbitrary_fill_track_func, ELEMENT);
g_object_set (source2, "duration", GST_SECOND, "start", (guint64) 42, NULL);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (source2),
g_object_set (source4, "duration", GST_SECOND, "start", (guint64) 42, NULL);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (source4),
GST_SECOND);
/* create half-second transitions */
@ -220,19 +220,19 @@ GST_START_TEST (test_gsl_with_transitions)
tr2 = ges_timeline_transition_new (NULL);
g_object_set (tr2, "duration", HALF_SECOND, "start", (guint64) 42, NULL);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr1), HALF_SECOND);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr2), HALF_SECOND);
tr3 = ges_timeline_transition_new (NULL);
g_object_set (tr3, "duration", HALF_SECOND, "start", (guint64) 42, NULL);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr1), HALF_SECOND);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr3), HALF_SECOND);
tr4 = ges_timeline_transition_new (NULL);
g_object_set (tr4, "duration", HALF_SECOND, "start", (guint64) 42, NULL);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr1), HALF_SECOND);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr4), HALF_SECOND);
tr5 = ges_timeline_transition_new (NULL);
g_object_set (tr5, "duration", HALF_SECOND, "start", (guint64) 42, NULL);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr1), HALF_SECOND);
fail_unless_equals_uint64 (GES_TIMELINE_OBJECT_DURATION (tr5), HALF_SECOND);
/* simple test scenario with several sources in layer */
/* 0 [0 0.5 1 1.5 2 2.5 3] */