Commit cf366488 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 2d6043eb
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment