[PATCH 3/5] quartz/dsoundrender: Don't drop stream_cs in DSoundRender_SendSampleData().
Zebediah Figura
z.figura12 at gmail.com
Mon Nov 30 23:51:34 CST 2020
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 at gmail.com>
---
dlls/quartz/dsoundrender.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c
index d00c9e92570..fc64eae8f72 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -258,9 +258,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)
--
2.29.2
More information about the wine-devel
mailing list