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
This commit is contained in:
Sebastian Dröge 2014-09-01 12:28:24 +03:00
parent 3c8d3465bf
commit e783a366cb

View file

@ -821,10 +821,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);