don't send events below PAUSED on parent

Original commit message from CVS:
don't send events below PAUSED on parent
This commit is contained in:
Thomas Vander Stichele 2004-07-08 16:38:49 +00:00
parent 411bc65e95
commit 6595422e32
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2004-07-08 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
* 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 <wim@fluendo.com>
* gst/schedulers/gstoptimalscheduler.c:

View file

@ -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));