Skip to content
Snippets Groups Projects
Commit 6f05c692 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard
Browse files

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: default avatarZebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent cf366488
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment