Zebediah Figura : qcap: Use CoCreateInstance() directly instead of BaseOutputPinImpl_InitAllocator().

Alexandre Julliard julliard at winehq.org
Tue Feb 8 16:11:44 CST 2022


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

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Mon Feb  7 23:22:44 2022 -0600

qcap: Use CoCreateInstance() directly instead of BaseOutputPinImpl_InitAllocator().

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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))




More information about the wine-cvs mailing list