summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-08-30 19:15:42 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2012-09-03 11:07:10 +0200
commit8f282de37d6640274b44c9fb0fb986fa3f812162 (patch)
tree4b8d8ff9f3af171453aab8a3bd26c7dc18fb7a06 /gst
parentdcacfb17cb60057f55435a50b96734138ab3b5f7 (diff)
pad: check sticky events also after pad block
Recheck for sticky events after doing a pad block because the pad block could have caused a relink and then we need to resend the events to the newly linked pad. Fixes things like switching of visualisations.
Diffstat (limited to 'gst')
-rw-r--r--gst/gstpad.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/gstpad.c b/gst/gstpad.c
index 1529528367..971f84b404 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -3811,6 +3811,10 @@ gst_pad_push_data (GstPad * pad, GstPadProbeType type, void *data)
/* do block probes */
PROBE_PUSH (pad, type | GST_PAD_PROBE_TYPE_BLOCK, data, probe_stopped);
+ /* recheck sticky events because the probe might have cause a relink */
+ if (G_UNLIKELY ((ret = check_sticky (pad))) != GST_FLOW_OK)
+ goto events_error;
+
/* do post-blocking probes */
PROBE_PUSH (pad, type, data, probe_stopped);
@@ -3993,6 +3997,10 @@ gst_pad_get_range_unchecked (GstPad * pad, guint64 offset, guint size,
PROBE_PULL (pad, GST_PAD_PROBE_TYPE_PULL | GST_PAD_PROBE_TYPE_BLOCK,
res_buf, offset, size, probe_stopped);
+ /* recheck sticky events because the probe might have cause a relink */
+ if (G_UNLIKELY ((ret = check_sticky (pad))) != GST_FLOW_OK)
+ goto events_error;
+
ACQUIRE_PARENT (pad, parent, no_parent);
GST_OBJECT_UNLOCK (pad);