[PATCH 1/5] qcap: Use CoCreateInstance() directly instead of BaseOutputPinImpl_InitAllocator().

Zebediah Figura zfigura at codeweavers.com
Mon Feb 7 23:22:44 CST 2022


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/qcap/avimux.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index fe4add83b7c..45b995cc2ff 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1177,9 +1177,12 @@ static HRESULT WINAPI AviMuxOut_DecideAllocator(struct strmbase_source *base,
 
     TRACE("(%p)->(%p %p)\n", base, pPin, pAlloc);
 
-    hr = BaseOutputPinImpl_InitAllocator(base, pAlloc);
-    if(FAILED(hr))
+    if (FAILED(hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL,
+            CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)pAlloc)))
+    {
+        ERR("Failed to create allocator, hr %#x.\n", hr);
         return hr;
+    }
 
     hr = IMemInputPin_GetAllocatorRequirements(pPin, &req);
     if(FAILED(hr))
-- 
2.34.1




More information about the wine-devel mailing list