Module: wine Branch: master Commit: cf366488f6076859fdbd75a3570711ea51c0cc21 URL: https://source.winehq.org/git/wine.git/?a=commit;h=cf366488f6076859fdbd75a35... Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Nov 30 23:51:34 2020 -0600 quartz/dsoundrender: Don't drop stream_cs in DSoundRender_SendSampleData(). We don't grab stream_cs to change any variables checked here, except to reset flush_event, and that cannot result in a deadlock. The only possible deadlocks here are: (1) between this function and EndOfStream(), which is correct, as the two should presumably be serialized; (2) between this function and EndFlush(); however, in that case we expect BeginFlush() first, which will unblock the streaming thread. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/dsoundrender.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 98ff21c0da1..099af2c4e21 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -257,9 +257,7 @@ static HRESULT DSoundRender_SendSampleData(struct dsound_render *This, hr = S_FALSE; if (hr != S_OK) { - LeaveCriticalSection(&This->stream_cs); ret = WaitForSingleObject(This->flush_event, 10); - EnterCriticalSection(&This->stream_cs); if (This->sink.flushing || This->filter.state == State_Stopped) return This->filter.state == State_Paused ? S_OK : VFW_E_WRONG_STATE; if (ret != WAIT_TIMEOUT)