Zebediah Figura : quartz: Commit the allocator directly.
Alexandre Julliard
julliard at winehq.org
Wed Nov 18 15:47:59 CST 2020
Module: wine
Branch: master
Commit: 9685f12d7cbe83104bfb19162b39d60e7c307f48
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9685f12d7cbe83104bfb19162b39d60e7c307f48
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Nov 17 16:30:54 2020 -0600
quartz: Commit the allocator directly.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/quartz/acmwrapper.c | 7 +++++--
dlls/quartz/avidec.c | 9 +++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c
index 6df04595bb5..23ad235327a 100644
--- a/dlls/quartz/acmwrapper.c
+++ b/dlls/quartz/acmwrapper.c
@@ -500,8 +500,10 @@ static void acm_wrapper_destroy(struct strmbase_filter *iface)
static HRESULT acm_wrapper_init_stream(struct strmbase_filter *iface)
{
struct acm_wrapper *filter = impl_from_strmbase_filter(iface);
+ HRESULT hr;
- BaseOutputPinImpl_Active(&filter->source);
+ if (filter->source.pin.peer && FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
+ ERR("Failed to commit allocator, hr %#x.\n", hr);
return S_OK;
}
@@ -509,7 +511,8 @@ static HRESULT acm_wrapper_cleanup_stream(struct strmbase_filter *iface)
{
struct acm_wrapper *filter = impl_from_strmbase_filter(iface);
- BaseOutputPinImpl_Inactive(&filter->source);
+ if (filter->source.pin.peer)
+ IMemAllocator_Decommit(filter->source.pAllocator);
return S_OK;
}
diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c
index ada3a1c7e62..ef232673e56 100644
--- a/dlls/quartz/avidec.c
+++ b/dlls/quartz/avidec.c
@@ -564,6 +564,7 @@ static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface)
struct avi_decompressor *filter = impl_from_strmbase_filter(iface);
VIDEOINFOHEADER *source_format;
LRESULT res;
+ HRESULT hr;
filter->late = -1;
@@ -574,7 +575,9 @@ static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface)
return E_FAIL;
}
- BaseOutputPinImpl_Active(&filter->source);
+ if (filter->source.pin.peer && FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
+ ERR("Failed to commit allocator, hr %#x.\n", hr);
+
return S_OK;
}
@@ -589,7 +592,9 @@ static HRESULT avi_decompressor_cleanup_stream(struct strmbase_filter *iface)
return E_FAIL;
}
- BaseOutputPinImpl_Inactive(&filter->source);
+ if (filter->source.pin.peer)
+ IMemAllocator_Decommit(filter->source.pAllocator);
+
return S_OK;
}
More information about the wine-cvs
mailing list