diff options
author | Thibault Saunier <thibault.saunier@collabora.com> | 2013-08-13 18:20:27 +0200 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@collabora.com> | 2013-08-15 13:49:18 +0200 |
commit | a24a3be13b81c5d0080c061edf61daece6341f95 (patch) | |
tree | 9dc7d96944ea72347d339d3708a7d47f4ccad8a1 | |
parent | d09f5c236de4156af8437827a322e3b7c4cab226 (diff) |
There is a race where we can have an EOS from the element which
srcpad is our ghost pad but other elements upstream are still outputing
data and we flush the element so its pads have no segment info
anymore, and we end up having warning about flow before segement event.
The solution here is that we do not let any data flowing when we are
updating the pipeline.
-rw-r--r-- | gnl/gnlcomposition.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index 830ff2d..006ed4e 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -1210,6 +1210,11 @@ pad_blocked (GstPad * pad, GstPadProbeInfo * info, GnlComposition * comp) { GST_DEBUG_OBJECT (comp, "Pad : %s:%s", GST_DEBUG_PAD_NAME (pad)); + /* When updating the pipeline, do not let data flowing */ + if (comp->priv->stackvalid == FALSE && + GST_IS_BUFFER (GST_PAD_PROBE_INFO_DATA (info))) + return GST_PAD_PROBE_DROP; + return GST_PAD_PROBE_OK; } @@ -2587,6 +2592,9 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, stack = get_clean_toplevel_stack (comp, ¤ttime, &new_start, &new_stop); samestack = are_same_stacks (priv->current, stack); + /* invalidate the stack while modifying it */ + priv->stackvalid = FALSE; + /* 2. If stacks are different, unlink/relink objects */ if (!samestack) todeactivate = compare_relink_stack (comp, stack, modify); @@ -2622,9 +2630,6 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, g_node_destroy (priv->current); priv->current = NULL; - /* invalidate the stack while modifying it */ - priv->stackvalid = FALSE; - /* 5. deactivate unused elements */ if (todeactivate) { GList *tmp; |