Commit b133bea4 authored by Wim Taymans's avatar Wim Taymans
Browse files

pad: don't store events on flushing pads

check the flushing state of the pad before storing the event.
parent b7966c0c
...@@ -4450,6 +4450,9 @@ gst_pad_send_event (GstPad * pad, GstEvent * event) ...@@ -4450,6 +4450,9 @@ gst_pad_send_event (GstPad * pad, GstEvent * event)
GST_CAT_DEBUG_OBJECT (GST_CAT_EVENT, pad, "have event type %s", GST_CAT_DEBUG_OBJECT (GST_CAT_EVENT, pad, "have event type %s",
GST_EVENT_TYPE_NAME (event)); GST_EVENT_TYPE_NAME (event));
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
goto flushing;
if (serialized) { if (serialized) {
/* lock order: STREAM_LOCK, LOCK, recheck flushing. */ /* lock order: STREAM_LOCK, LOCK, recheck flushing. */
GST_OBJECT_UNLOCK (pad); GST_OBJECT_UNLOCK (pad);
...@@ -4499,9 +4502,6 @@ gst_pad_send_event (GstPad * pad, GstEvent * event) ...@@ -4499,9 +4502,6 @@ gst_pad_send_event (GstPad * pad, GstEvent * event)
} }
} }
/* now do the probe */ /* now do the probe */
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
goto flushing;
PROBE_PUSH (pad, PROBE_PUSH (pad,
type | GST_PAD_PROBE_TYPE_PUSH | type | GST_PAD_PROBE_TYPE_PUSH |
GST_PAD_PROBE_TYPE_BLOCK, event, probe_stopped); GST_PAD_PROBE_TYPE_BLOCK, event, probe_stopped);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment