wasapisink: fix missing unlock in case IAudioClient_Start fails

https://bugzilla.gnome.org/show_bug.cgi?id=796354
This commit is contained in:
Christoph Reiter 2018-05-23 21:10:00 +02:00 committed by Nirbheek Chauhan
parent 2d98a5c1d7
commit ffb8476a38

View 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);