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

strmbase: Swap the lock order in IPin::EndFlush().


This more closely resembles the threading model prescribed by the DirectX SDK
documentation. In particular, the page "Flushing Data" recommends that
IPin::BeginFlush() do the following steps in order:

1. take the filter lock
2. signal the streaming thread to complete
3. take the streaming lock, if necessary

Signed-off-by: default avatarZebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent 63a6b308
No related branches found
No related tags found
No related merge requests found
......@@ -133,8 +133,8 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
TRACE("iface %p.\n", iface);
EnterCriticalSection(&pFilter->csRenderLock);
EnterCriticalSection(&pFilter->filter.csFilter);
EnterCriticalSection(&pFilter->csRenderLock);
pFilter->eos = FALSE;
hr = BaseInputPinImpl_EndFlush(iface);
if (SUCCEEDED(hr))
......@@ -146,8 +146,8 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
if (pFilter->pFuncsTable->pfnEndFlush)
hr = pFilter->pFuncsTable->pfnEndFlush(pFilter);
}
LeaveCriticalSection(&pFilter->filter.csFilter);
LeaveCriticalSection(&pFilter->csRenderLock);
LeaveCriticalSection(&pFilter->filter.csFilter);
return hr;
}
......
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