wasapi: added missing lock release in case of error in gst_wasapi_xxx_reset

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1440>
This commit is contained in:
Silvio Lazzeretti 2020-07-15 10:39:33 +02:00 committed by GStreamer Merge Bot
parent e6944da134
commit 3803fa29b2
2 changed files with 6 additions and 4 deletions

View file

@ -746,11 +746,12 @@ gst_wasapi_sink_reset (GstAudioSink * asink)
GST_OBJECT_LOCK (self);
hr = IAudioClient_Stop (self->client);
HR_FAILED_AND (hr, IAudioClient::Stop,);
HR_FAILED_AND (hr, IAudioClient::Stop, goto err);
hr = IAudioClient_Reset (self->client);
HR_FAILED_AND (hr, IAudioClient::Reset,);
HR_FAILED_AND (hr, IAudioClient::Reset, goto err);
err:
self->client_needs_restart = TRUE;
GST_OBJECT_UNLOCK (self);
}

View file

@ -713,11 +713,12 @@ gst_wasapi_src_reset (GstAudioSrc * asrc)
GST_OBJECT_LOCK (self);
hr = IAudioClient_Stop (self->client);
HR_FAILED_RET (hr, IAudioClock::Stop,);
HR_FAILED_AND (hr, IAudioClock::Stop, goto err);
hr = IAudioClient_Reset (self->client);
HR_FAILED_RET (hr, IAudioClock::Reset,);
HR_FAILED_AND (hr, IAudioClock::Reset, goto err);
err:
self->client_needs_restart = TRUE;
GST_OBJECT_UNLOCK (self);
}