From 236ebeeb682f46cb3b62a461350b49bed2362483 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 20 May 2020 13:53:51 +0200 Subject: [PATCH] gst: fix bad unlock when pool acquire fails The mutexs was not locked so don't try to unlock. --- src/gst/gstpipewiresink.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gst/gstpipewiresink.c b/src/gst/gstpipewiresink.c index a26af621e..be383ee56 100644 --- a/src/gst/gstpipewiresink.c +++ b/src/gst/gstpipewiresink.c @@ -570,7 +570,7 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer) pw_thread_loop_lock (pwsink->loop); if (pw_stream_get_state (pwsink->stream, &error) != PW_STREAM_STATE_STREAMING) - goto done; + goto done_unlock; if (buffer->pool != GST_BUFFER_POOL_CAST (pwsink->pool)) { GstBuffer *b = NULL; @@ -592,15 +592,15 @@ gst_pipewire_sink_render (GstBaseSink * bsink, GstBuffer * buffer) pw_thread_loop_lock (pwsink->loop); if (pw_stream_get_state (pwsink->stream, &error) != PW_STREAM_STATE_STREAMING) - goto done; + goto done_unlock; } GST_DEBUG ("push buffer"); do_send_buffer (pwsink, buffer); -done: +done_unlock: pw_thread_loop_unlock (pwsink->loop); - +done: return res; not_negotiated: