Alessandro Pignotti : quartz: Get the CLSID directly from the filter.
Alexandre Julliard
julliard at winehq.org
Fri Mar 1 12:42:23 CST 2013
Module: wine
Branch: master
Commit: 3271406502115910454d1838570e9d13daa71bc8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3271406502115910454d1838570e9d13daa71bc8
Author: Alessandro Pignotti <a.pignotti at sssup.it>
Date: Sun Feb 24 23:21:48 2013 +0100
quartz: Get the CLSID directly from the filter.
---
dlls/quartz/filtergraph.c | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index acd6dca..6b53d72 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -1025,14 +1025,28 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
IAMGraphBuilderCallback *callback = NULL;
hr = GetFilterInfo(pMoniker, &clsid, &var);
- IMoniker_Release(pMoniker);
if (FAILED(hr)) {
WARN("Unable to retrieve filter info (%x)\n", hr);
goto error;
}
+ hr = IMoniker_BindToObject(pMoniker, NULL, NULL, &IID_IBaseFilter, (LPVOID*)&pfilter);
+ IMoniker_Release(pMoniker);
+ if (FAILED(hr)) {
+ WARN("Unable to create filter (%x), trying next one\n", hr);
+ 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);
goto error;
}
@@ -1052,12 +1066,6 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut,
}
}
- hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&pfilter);
- if (FAILED(hr)) {
- WARN("Unable to create filter (%x), trying next one\n", hr);
- goto error;
- }
-
if (callback)
{
HRESULT rc;
More information about the wine-cvs
mailing list