Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/amstream/tests/amstream.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index c5fd5abe620..676b5d4f386 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -1007,9 +1007,13 @@ static void testfilter_destroy(struct strmbase_filter *iface) static HRESULT testfilter_init_stream(struct strmbase_filter *iface) { struct testfilter *filter = impl_from_BaseFilter(iface); + HRESULT hr;
- if (SUCCEEDED(filter->init_stream_hr)) - BaseOutputPinImpl_Active(&filter->source); + if (SUCCEEDED(filter->init_stream_hr) && filter->source.pin.peer) + { + hr = IMemAllocator_Commit(filter->source.pAllocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + }
return filter->init_stream_hr; } @@ -1017,9 +1021,13 @@ static HRESULT testfilter_init_stream(struct strmbase_filter *iface) static HRESULT testfilter_cleanup_stream(struct strmbase_filter *iface) { struct testfilter *filter = impl_from_BaseFilter(iface); + HRESULT hr;
- if (SUCCEEDED(filter->cleanup_stream_hr)) - BaseOutputPinImpl_Inactive(&filter->source); + if (SUCCEEDED(filter->cleanup_stream_hr) && filter->source.pin.peer) + { + hr = IMemAllocator_Decommit(filter->source.pAllocator); + ok(hr == S_OK, "Got hr %#x.\n", hr); + }
return filter->cleanup_stream_hr; }