summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-05-20 09:48:56 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-05-21 10:59:04 +0200
commit5a70f26dbdfcccb9ea889581ef8657ae15205214 (patch)
tree7c0743c3420204f5ca313b58eed931c9a2c8a695
parent5a67055d773e8250e305839e9fb123f002ba3f42 (diff)
downloadgstreamer-plugins-base-5a70f26dbdfcccb9ea889581ef8657ae15205214.tar.gz
playsink: Always take the playsink lock when adding or removing pad probes
Otherwise we might end up inside the callback without having stored the probe id... then try to remove that probe (not!) from the callback and wait forever for the pad to unblock.
-rw-r--r--gst/playback/gstplaysink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
index 310cfaee1..0b7657e19 100644
--- a/gst/playback/gstplaysink.c
+++ b/gst/playback/gstplaysink.c
@@ -4206,6 +4206,8 @@ gst_play_sink_request_pad (GstPlaySink * playsink, GstPlaySinkType type)
* element is 'running' */
gst_pad_set_active (res, TRUE);
gst_element_add_pad (GST_ELEMENT_CAST (playsink), res);
+
+ GST_PLAY_SINK_LOCK (playsink);
if (block_id && *block_id == 0) {
GstPad *blockpad =
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (res)));
@@ -4221,6 +4223,7 @@ gst_play_sink_request_pad (GstPlaySink * playsink, GstPlaySinkType type)
PENDING_FLAG_SET (playsink, type);
gst_object_unref (blockpad);
}
+ GST_PLAY_SINK_UNLOCK (playsink);
if (!activate)
gst_pad_set_active (res, activate);
}