Zebediah Figura : quartz: Use IMemAllocator::GetBuffer() directly.

Alexandre Julliard julliard at winehq.org
Mon Feb 7 15:56:03 CST 2022


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

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Sun Feb  6 20:59:38 2022 -0600

quartz: Use IMemAllocator::GetBuffer() directly.

BaseOutputPinImpl_GetDeliveryBuffer() is doing nothing helpful here.

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

---

 dlls/quartz/acmwrapper.c | 3 +--
 dlls/quartz/avidec.c     | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c
index 12d96f69376..cf8e7cd125d 100644
--- a/dlls/quartz/acmwrapper.c
+++ b/dlls/quartz/acmwrapper.c
@@ -140,8 +140,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed
 
     while(hr == S_OK && ash.cbSrcLength)
     {
-        hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0);
-        if (FAILED(hr))
+        if (FAILED(hr = IMemAllocator_GetBuffer(This->source.pAllocator, &pOutSample, NULL, NULL, 0)))
         {
             ERR("Failed to get sample, hr %#lx.\n", hr);
             return hr;
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c
index 30b6c741eed..f8660890273 100644
--- a/dlls/quartz/avidec.c
+++ b/dlls/quartz/avidec.c
@@ -139,8 +139,8 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface,
     /* Update input size to match sample size */
     This->pBihIn->biSizeImage = cbSrcStream;
 
-    hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0);
-    if (FAILED(hr)) {
+    if (FAILED(hr = IMemAllocator_GetBuffer(This->source.pAllocator, &pOutSample, NULL, NULL, 0)))
+    {
         ERR("Failed to get sample, hr %#lx.\n", hr);
         return hr;
     }




More information about the wine-cvs mailing list