Module: wine
Branch: master
Commit: 8a75411ec5349be62ff8c7abd8d7841a533e01ba
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8a75411ec5349be62ff8c7ab…
Author: Zebediah Figura <z.figura12(a)gmail.com>
Date: Mon Nov 30 23:51:36 2020 -0600
qedit/nullrenderer: Don't drop csRenderLock in NullRenderer_DoRenderSample().
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/qedit/nullrenderer.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/dlls/qedit/nullrenderer.c b/dlls/qedit/nullrenderer.c
index a8594eade8b..97e3cdbb202 100644
--- a/dlls/qedit/nullrenderer.c
+++ b/dlls/qedit/nullrenderer.c
@@ -46,9 +46,7 @@ static HRESULT WINAPI NullRenderer_DoRenderSample(struct strmbase_renderer *ifac
const HANDLE events[2] = {filter->run_event, filter->renderer.flush_event};
SetEvent(filter->renderer.state_event);
- LeaveCriticalSection(&filter->renderer.csRenderLock);
WaitForMultipleObjects(2, events, FALSE, INFINITE);
- EnterCriticalSection(&filter->renderer.csRenderLock);
}
return S_OK;
Module: wine
Branch: master
Commit: 6f05c692107b35681944d6ef5c6cf7c1c057a97d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6f05c692107b35681944d6ef…
Author: Zebediah Figura <z.figura12(a)gmail.com>
Date: Mon Nov 30 23:51:35 2020 -0600
strmbase: Don't drop csRenderLock in BaseRenderer_Receive().
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/strmbase/renderer.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c
index dde56b7a346..24d209703ca 100644
--- a/dlls/strmbase/renderer.c
+++ b/dlls/strmbase/renderer.c
@@ -224,18 +224,15 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
IReferenceClock_AdviseTime(filter->filter.clock, filter->stream_start,
start, (HEVENT)filter->advise_event, &cookie);
- LeaveCriticalSection(&filter->csRenderLock);
-
ret = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
IReferenceClock_Unadvise(filter->filter.clock, cookie);
if (ret == 1)
{
+ LeaveCriticalSection(&filter->csRenderLock);
TRACE("Flush signaled; discarding current sample.\n");
return S_OK;
}
-
- EnterCriticalSection(&filter->csRenderLock);
}
}
Module: wine
Branch: master
Commit: cf366488f6076859fdbd75a3570711ea51c0cc21
URL: https://source.winehq.org/git/wine.git/?a=commit;h=cf366488f6076859fdbd75a3…
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)
Module: wine
Branch: master
Commit: 2d6043eb4f2f1b104416137ff7f5caecfcf62d66
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2d6043eb4f2f1b104416137f…
Author: Zebediah Figura <z.figura12(a)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(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 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;