From 6595422e326ac5f9956c35296680e0511f576e64 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 8 Jul 2004 16:38:49 +0000 Subject: [PATCH] don't send events below PAUSED on parent Original commit message from CVS: don't send events below PAUSED on parent --- ChangeLog | 7 +++++++ gst/gstpad.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 35c619d594..24c233f8fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-07-08 Thomas Vander Stichele + + * gst/gstpad.c: (gst_pad_event_default_dispatch), + (gst_pad_send_event), (gst_pad_call_chain_function): + events sent to elements below PAUSED cannot be handled, so + don't try to + 2004-07-08 Wim Taymans * gst/schedulers/gstoptimalscheduler.c: diff --git a/gst/gstpad.c b/gst/gstpad.c index 35662e17af..b03afafbe5 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -4076,12 +4076,16 @@ gst_pad_send_event (GstPad * pad, GstEvent * event) { gboolean success = FALSE; GstRealPad *rpad; + GstElement *parent; g_return_val_if_fail (GST_IS_PAD (pad), FALSE); g_return_val_if_fail (event != NULL, FALSE); + parent = gst_pad_get_parent (pad); + g_return_val_if_fail (GST_STATE (parent) >= GST_STATE_PAUSED, FALSE); rpad = GST_PAD_REALIZE (pad); + if (GST_EVENT_SRC (event) == NULL) GST_EVENT_SRC (event) = gst_object_ref (GST_OBJECT (rpad));