wasapisink: fix missing unlock in case IAudioClient_Start fails
authorChristoph Reiter <reiter.christoph@gmail.com>
Wed, 23 May 2018 19:10:00 +0000 (21:10 +0200)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 25 May 2018 13:35:57 +0000 (19:05 +0530)
https://bugzilla.gnome.org/show_bug.cgi?id=796354

sys/wasapi/gstwasapisink.c

index c636bca..f9992df 100644 (file)
@@ -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);