Zebediah Figura : quartz/dsoundrender: Don't drop stream_cs in DSoundRender_HandleEndOfStream().
Alexandre Julliard
julliard at winehq.org
Tue Dec 1 15:40:33 CST 2020
Module: wine
Branch: master
Commit: 2d6043eb4f2f1b104416137ff7f5caecfcf62d66
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2d6043eb4f2f1b104416137ff7f5caecfcf62d66
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Mon Nov 30 23:51:33 2020 -0600
quartz/dsoundrender: Don't drop stream_cs in DSoundRender_HandleEndOfStream().
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 Receive(), 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>
Signed-off-by: Alexandre Julliard <julliard at 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 788643af372..98ff21c0da1 100644
--- a/dlls/quartz/dsoundrender.c
+++ b/dlls/quartz/dsoundrender.c
@@ -236,9 +236,7 @@ static HRESULT DSoundRender_HandleEndOfStream(struct dsound_render *This)
if (pos1 == pos2)
break;
- LeaveCriticalSection(&This->stream_cs);
WaitForSingleObject(This->flush_event, 10);
- EnterCriticalSection(&This->stream_cs);
}
return S_OK;
More information about the wine-cvs
mailing list