timeline: when there are no objects anymore, set duration to 0.

This commit is contained in:
Mathieu Duponchelle 2013-08-12 16:13:40 +02:00 committed by Thibault Saunier
parent dec80f3e4d
commit 09405c0080

View file

@ -602,10 +602,15 @@ timeline_update_duration (GESTimeline * timeline)
GSequenceIter *it = g_sequence_get_end_iter (timeline->priv->starts_ends);
it = g_sequence_iter_prev (it);
if (g_sequence_iter_is_end (it))
if (g_sequence_iter_is_end (it)) {
timeline->priv->duration = 0;
g_object_notify_by_pspec (G_OBJECT (timeline), properties[PROP_DURATION]);
return;
}
cduration = g_sequence_get (it);
if (cduration && timeline->priv->duration != *cduration) {
GST_DEBUG ("track duration : %" GST_TIME_FORMAT " current : %"
GST_TIME_FORMAT, GST_TIME_ARGS (*cduration),