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@gmail.com --- 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); } }