Zebediah Figura : quartz/filtergraph: Don' t prevent the same filter from being used multiple times in IGraphBuilder_Connect ().

Alexandre Julliard julliard at winehq.org
Mon Oct 8 15:44:06 CDT 2018


Module: wine
Branch: master
Commit: fb6c88e260ee0c2257efde04b02282e91c0887ac
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=fb6c88e260ee0c2257efde04b02282e91c0887ac

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Sun Oct  7 17:18:29 2018 -0500

quartz/filtergraph: Don't prevent the same filter from being used multiple times in IGraphBuilder_Connect().

This reverts part of 6301fec0ef1ad61c82619e8c8e5a737f7871b035.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/quartz/filtergraph.c       | 25 -------------------------
 dlls/quartz/tests/filtergraph.c |  1 +
 2 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index c859564..07d40db 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -1091,7 +1091,6 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
     GUID tab[2];
     IMoniker* pMoniker;
     PIN_INFO PinInfo;
-    CLSID FilterCLSID;
     PIN_DIRECTION dir;
     IFilterMapper2 *pFilterMapper2 = NULL;
 
@@ -1184,15 +1183,6 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
         IEnumPins_Release(penumpins);
     }
 
-    hr = IPin_QueryPinInfo(ppinIn, &PinInfo);
-    if (FAILED(hr))
-        goto out;
-
-    hr = IBaseFilter_GetClassID(PinInfo.pFilter, &FilterCLSID);
-    IBaseFilter_Release(PinInfo.pFilter);
-    if (FAILED(hr))
-        goto out;
-
     /* Find the appropriate transform filter than can transform the minor media type of output pin of the upstream 
      * filter to the minor mediatype of input pin of the renderer */
     hr = IPin_EnumMediaTypes(ppinOut, &penummt);
@@ -1236,7 +1226,6 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
     while (IEnumMoniker_Next(pEnumMoniker, 1, &pMoniker, NULL) == S_OK)
     {
         VARIANT var;
-        GUID clsid;
         IPin* ppinfilter = NULL;
         IBaseFilter* pfilter = NULL;
         IAMGraphBuilderCallback *callback = NULL;
@@ -1254,20 +1243,6 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
             goto error;
         }
 
-        hr = IBaseFilter_GetClassID(pfilter, &clsid);
-        if (FAILED(hr))
-        {
-            IBaseFilter_Release(pfilter);
-            goto error;
-	}
-
-        if (IsEqualGUID(&clsid, &FilterCLSID)) {
-            /* Skip filter (same as the one the output pin belongs to) */
-            IBaseFilter_Release(pfilter);
-            pfilter = NULL;
-            goto error;
-        }
-
         if (This->pSite)
         {
             IUnknown_QueryInterface(This->pSite, &IID_IAMGraphBuilderCallback, (LPVOID*)&callback);
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index e64a9fa..897ba3a 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -1271,6 +1271,7 @@ static ULONG WINAPI testfilter_Release(IBaseFilter *iface)
 static HRESULT WINAPI testfilter_GetClassID(IBaseFilter *iface, CLSID *clsid)
 {
     if (winetest_debug > 1) trace("%p->GetClassID()\n", iface);
+    memset(clsid, 0xde, sizeof(*clsid));
     return S_OK;
 }
 




More information about the wine-cvs mailing list