quartz: Commit the allocator directly.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-11-17 16:30:54 -06:00 committed by Alexandre Julliard
parent a103368917
commit 9685f12d7c
2 changed files with 12 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;
}