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@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3933ceca58
commit
2d6043eb4f
|
@ -236,9 +236,7 @@ static HRESULT DSoundRender_HandleEndOfStream(struct dsound_render *This)
|
||||||
if (pos1 == pos2)
|
if (pos1 == pos2)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
LeaveCriticalSection(&This->stream_cs);
|
|
||||||
WaitForSingleObject(This->flush_event, 10);
|
WaitForSingleObject(This->flush_event, 10);
|
||||||
EnterCriticalSection(&This->stream_cs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
Loading…
Reference in New Issue