From: <bi...@ke...> - 2009-08-12 16:23:54
|
Module: gnonlin Branch: master Commit: b785604f65f14c9d9514eaebc406dfd322c05f3f URL: http://cgit.freedesktop.org/gstreamer/gnonlin/commit/?id=b785604f65f14c9d9514eaebc406dfd322c05f3f Author: Edward Hervey <bi...@bi...> Date: Wed Aug 12 18:31:36 2009 +0200 gnlcomposition: Drop incoming events when not entirely linked. Fixes #583145 --- gnl/gnlcomposition.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index ae13b1c..df647f9 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -954,15 +954,18 @@ gnl_composition_event_handler (GstPad * ghostpad, GstEvent * event) break; } - /* FIXME : What should we do here if waitingpads != 0 ?? */ - /* Delay ? Ignore ? Refuse ? */ - if (res && comp->priv->ghostpad) { - GST_DEBUG_OBJECT (comp, "About to call gnl_event_pad_func()"); COMP_OBJECTS_LOCK (comp); - res = comp->priv->gnl_event_pad_func (comp->priv->ghostpad, event); + /* If the timeline isn't entirely reconstructed, we silently ignore the + * event. In the case of seeks the pipeline will already be correctly + * configured at this point*/ + if (comp->priv->waitingpads == 0) { + GST_DEBUG_OBJECT (comp, "About to call gnl_event_pad_func()"); + res = comp->priv->gnl_event_pad_func (comp->priv->ghostpad, event); + GST_DEBUG_OBJECT (comp, "Done calling gnl_event_pad_func() %d", res); + } else + gst_event_unref (event); COMP_OBJECTS_UNLOCK (comp); - GST_DEBUG_OBJECT (comp, "Done calling gnl_event_pad_func() %d", res); } gst_object_unref (comp); return res; |