mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
timeline: when there are no objects anymore, set duration to 0.
This commit is contained in:
parent
dec80f3e4d
commit
09405c0080
1 changed files with 6 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue