quartz/dsoundrender: Avoid taking the filter lock in IPin::EndOfStream().
IPin::EndOfStream() is called from a streaming thread. The streaming thread should never take the filter lock. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4ccdf3e58a
commit
09b39646b0
|
@ -236,11 +236,9 @@ static HRESULT DSoundRender_HandleEndOfStream(DSoundRenderImpl *This)
|
|||
break;
|
||||
|
||||
This->in_loop = 1;
|
||||
LeaveCriticalSection(&This->renderer.filter.csFilter);
|
||||
LeaveCriticalSection(&This->renderer.csRenderLock);
|
||||
WaitForSingleObject(This->renderer.flush_event, 10);
|
||||
EnterCriticalSection(&This->renderer.csRenderLock);
|
||||
EnterCriticalSection(&This->renderer.filter.csFilter);
|
||||
This->in_loop = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,13 +88,11 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
|
|||
TRACE("iface %p.\n", iface);
|
||||
|
||||
EnterCriticalSection(&pFilter->csRenderLock);
|
||||
EnterCriticalSection(&pFilter->filter.csFilter);
|
||||
pFilter->eos = TRUE;
|
||||
if (pFilter->pFuncsTable->pfnEndOfStream)
|
||||
hr = pFilter->pFuncsTable->pfnEndOfStream(pFilter);
|
||||
else
|
||||
hr = BaseRendererImpl_EndOfStream(pFilter);
|
||||
LeaveCriticalSection(&pFilter->filter.csFilter);
|
||||
LeaveCriticalSection(&pFilter->csRenderLock);
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue