diff options
author | Thibault Saunier <thibault.saunier@collabora.com> | 2013-08-28 14:48:58 -0400 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@collabora.com> | 2013-08-28 21:40:37 -0400 |
commit | 79624b830af08437d9a17464ba688c6a228f790b (patch) | |
tree | bb04998e84e4fc8bbfc42b480b7adc6cc33345f2 | |
parent | 8f3bb083f8e59d9c541c4f80ed40a1b9c780e7dd (diff) |
composition: Do not update the pipeline if we are in NULL state
And always update start/duration when removing an object from the
composition
-rw-r--r-- | gnl/gnlcomposition.c | 9 |
1 files changed, 8 insertions, 1 deletions
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"); |