summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-09-01 12:28:24 +0300
committerThiago Santos <thiagoss@osg.samsung.com>2014-09-01 15:37:14 -0300
commit382f4b7eaa401c5ac8d6be1ea2a33d41f4e0089b (patch)
tree56ab143bfe32bf3a51890c99194b00feed3463dd
parent4b32be7346a1726cdb57ca8ade4795560424eda3 (diff)
downloadgstreamer-plugins-base-382f4b7eaa401c5ac8d6be1ea2a33d41f4e0089b.tar.gz
textoverlay: Don't hold any mutexes while calling negotiate
It's not done in any other code calling negotiate and will cause deadlocks as it is sending events and queries in the pipeline. Specifically this pipeline was deadlocking: gst-launch-1.0 videotestsrc ! textoverlay ! textoverlay ! fakesink
-rw-r--r--ext/pango/gstbasetextoverlay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
index da371afa6..dd83f9675 100644
--- a/ext/pango/gstbasetextoverlay.c
+++ b/ext/pango/gstbasetextoverlay.c
@@ -826,10 +826,10 @@ gst_base_text_overlay_setcaps (GstBaseTextOverlay * overlay, GstCaps * caps)
overlay->width = GST_VIDEO_INFO_WIDTH (&info);
overlay->height = GST_VIDEO_INFO_HEIGHT (&info);
- GST_BASE_TEXT_OVERLAY_LOCK (overlay);
- g_mutex_lock (GST_BASE_TEXT_OVERLAY_GET_CLASS (overlay)->pango_lock);
ret = gst_base_text_overlay_negotiate (overlay, caps);
+ GST_BASE_TEXT_OVERLAY_LOCK (overlay);
+ g_mutex_lock (GST_BASE_TEXT_OVERLAY_GET_CLASS (overlay)->pango_lock);
if (!overlay->attach_compo_to_buffer &&
!gst_base_text_overlay_can_handle_caps (caps)) {
GST_DEBUG_OBJECT (overlay, "unsupported caps %" GST_PTR_FORMAT, caps);