Module: wine Branch: master Commit: adcf93aeaf446d657685cee8976365980499fb69 URL: http://source.winehq.org/git/wine.git/?a=commit;h=adcf93aeaf446d657685cee897...
Author: Maarten Lankhorst m.b.lankhorst@gmail.com Date: Wed Jul 9 10:21:30 2008 -0700
quartz: Fix deadlocks in dsound renderer.
---
dlls/quartz/dsoundrender.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 618f073..7a6ec3d 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -265,6 +265,7 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) if (FAILED(hr)) { ERR("Cannot get pointer to sample data (%x)\n", hr); + LeaveCriticalSection(&This->csFilter); return hr; }
@@ -281,6 +282,7 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) if (IMediaSample_IsPreroll(pSample) == S_OK) { TRACE("Preroll!\n"); + LeaveCriticalSection(&This->csFilter); return S_OK; }
@@ -298,6 +300,7 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) if (This->state == State_Paused) { /* Assuming we return because of flushing */ + TRACE("Flushing\n"); LeaveCriticalSection(&This->csFilter); return S_OK; } @@ -887,7 +890,12 @@ static HRESULT WINAPI DSoundRender_InputPin_EndOfStream(IPin * iface) EnterCriticalSection(This->pin.pCritSec);
TRACE("(%p/%p)->()\n", This, iface); - InputPin_EndOfStream(iface); + hr = InputPin_EndOfStream(iface); + if (hr != S_OK) + { + ERR("%08x\n", hr); + return hr; + }
hr = IFilterGraph_QueryInterface(me->filterInfo.pGraph, &IID_IMediaEventSink, (LPVOID*)&pEventSink); if (SUCCEEDED(hr))