From 79624b830af08437d9a17464ba688c6a228f790b Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 28 Aug 2013 14:48:58 -0400 Subject: composition: Do not update the pipeline if we are in NULL state And always update start/duration when removing an object from the composition --- gnl/gnlcomposition.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index 5d55ae6..34d3d84 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -2629,6 +2629,12 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, if (!GST_CLOCK_TIME_IS_VALID (currenttime)) return FALSE; + if (state == GST_STATE_NULL && nextstate == GST_STATE_NULL) { + GST_DEBUG_OBJECT (comp, "STATE_NULL: not updating pipeline"); + return FALSE; + } + + GST_DEBUG_OBJECT (comp, "now really updating the pipeline, current-state:%s", gst_element_state_get_name (state)); @@ -3003,7 +3009,8 @@ gnl_composition_remove_object (GstBin * bin, GstElement * element) if (G_LIKELY (update_required)) { /* And update the pipeline at current position if needed */ update_pipeline_at_current_position (comp); - } + } else + update_start_stop_duration (comp); ret = GST_BIN_CLASS (parent_class)->remove_element (bin, element); GST_LOG_OBJECT (element, "Done removing from the composition, now updating"); -- cgit v1.2.3