quartz: Tell filters to stop sending data when the chain is broken

Chris Robinson chris.kcat at gmail.com
Wed Apr 4 11:27:04 CDT 2007


-------------- next part --------------
From 08f65ca61429ff49fde8e84890a486e2a6c86582 Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat at gmail.com>
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 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c
index 6791c2d..48cedfc 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);
-- 
1.4.4.4



More information about the wine-patches mailing list