Signed-off-by: Zebediah Figura z.figura12@gmail.com --- 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; }