From cdb90d3c8e7554216fac0af63041a820c79669d5 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Tue, 11 Jun 2013 18:22:11 +0200 Subject: composition: update operations base time even when we don't update the pipeline. --- gnl/gnlcomposition.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index 88e600f..6575caa 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -985,6 +985,31 @@ beach: return (guint64) value; } +static gboolean +update_base_time (GNode * node, GstClockTime * timestamp) +{ + if (GNL_IS_OPERATION (node->data)) + gnl_operation_update_base_time (GNL_OPERATION (node->data), *timestamp); + + return FALSE; +} + +static void +update_operations_base_time (GnlComposition * comp, gboolean reverse) +{ + GstClockTime timestamp; + + if (reverse) + timestamp = comp->priv->segment->stop; + else + timestamp = comp->priv->segment->start; + + COMP_OBJECTS_LOCK (comp); + g_node_traverse (comp->priv->current, G_IN_ORDER, G_TRAVERSE_ALL, -1, + (GNodeTraverseFunc) update_base_time, ×tamp); + COMP_OBJECTS_UNLOCK (comp); +} + /* Figures out if pipeline needs updating. Updates it and sends the seek event. @@ -1011,6 +1036,8 @@ seek_handling (GnlComposition * comp, gboolean initial, gboolean update) !update); else update_pipeline (comp, comp->priv->segment->stop, initial, TRUE, !update); + } else { + update_operations_base_time (comp, !(comp->priv->segment->rate >= 0.0)); } return TRUE; -- cgit v1.2.3