From 30abd4ed155730b534897e05cec9a44454e4e05a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 3 Apr 2007 11:04:59 -0700 Subject: [PATCH] quartz: Tell filters to stop sending data when the chain is broken. --- dlls/quartz/pin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index 6791c2df522..48cedfc5848 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -913,7 +913,10 @@ HRESULT OutputPin_SendSample(OutputPin * This, IMediaSample * pSample) * then it causes some problems (most notably with the native Video * Renderer) if we are re-entered for whatever reason */ hr = IMemInputPin_Receive(pMemConnected, pSample); - IBaseFilter_Release(pinInfo.pFilter); + + /* If the filter's destroyed, tell upstream to stop sending data */ + if(IBaseFilter_Release(pinInfo.pFilter) == 0 && SUCCEEDED(hr)) + hr = S_FALSE; } if (pMemConnected) IMemInputPin_Release(pMemConnected);