summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-05-23 21:10:00 +0200
committerNirbheek Chauhan <nirbheek@centricular.com>2018-05-25 19:05:57 +0530
commitffb8476a38ec5c56a19decb3d9dfe35b82190d3b (patch)
tree338efc522e3f4d79cb7a96f8d83bce9075adb92b
parent2d98a5c1d7854d5d15678945f84b2960a52f75f8 (diff)
wasapisink: fix missing unlock in case IAudioClient_Start fails
https://bugzilla.gnome.org/show_bug.cgi?id=796354
-rw-r--r--sys/wasapi/gstwasapisink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/wasapi/gstwasapisink.c b/sys/wasapi/gstwasapisink.c
index c636bca67..f9992df41 100644
--- a/sys/wasapi/gstwasapisink.c
+++ b/sys/wasapi/gstwasapisink.c
@@ -613,7 +613,8 @@ gst_wasapi_sink_write (GstAudioSink * asink, gpointer data, guint length)
GST_OBJECT_LOCK (self);
if (self->client_needs_restart) {
hr = IAudioClient_Start (self->client);
- HR_FAILED_AND (hr, IAudioClient::Start, length = 0; goto beach);
+ HR_FAILED_AND (hr, IAudioClient::Start,
+ GST_OBJECT_UNLOCK (self); length = 0; goto beach);
self->client_needs_restart = FALSE;
}
GST_OBJECT_UNLOCK (self);