Commit 09b39646 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 4ccdf3e5
......@@ -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;
}
......
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