Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/qasf/dmowrapper.c | 14 ++++++++++++++ dlls/qasf/tests/dmowrapper.c | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/qasf/dmowrapper.c b/dlls/qasf/dmowrapper.c index 7a18d0ba079..9480d3b95bb 100644 --- a/dlls/qasf/dmowrapper.c +++ b/dlls/qasf/dmowrapper.c @@ -358,11 +358,25 @@ static HRESULT dmo_wrapper_query_interface(struct strmbase_filter *iface, REFIID return E_NOINTERFACE; }
+static HRESULT dmo_wrapper_cleanup_stream(struct strmbase_filter *iface) +{ + struct dmo_wrapper *filter = impl_from_strmbase_filter(iface); + IMediaObject *dmo; + + IUnknown_QueryInterface(filter->dmo, &IID_IMediaObject, (void **)&dmo); + + IMediaObject_Flush(dmo); + + IMediaObject_Release(dmo); + return S_OK; +} + static struct strmbase_filter_ops filter_ops = { .filter_get_pin = dmo_wrapper_get_pin, .filter_destroy = dmo_wrapper_destroy, .filter_query_interface = dmo_wrapper_query_interface, + .filter_cleanup_stream = dmo_wrapper_cleanup_stream, };
HRESULT dmo_wrapper_create(IUnknown *outer, IUnknown **out) diff --git a/dlls/qasf/tests/dmowrapper.c b/dlls/qasf/tests/dmowrapper.c index cbeb6520d88..42d3a4f0e0e 100644 --- a/dlls/qasf/tests/dmowrapper.c +++ b/dlls/qasf/tests/dmowrapper.c @@ -1250,7 +1250,7 @@ static void test_filter_state(IMediaControl *control) ok(!got_Flush, "Unexpected IMediaObject::Flush().\n"); hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(got_Flush, "Expected IMediaObject::Flush().\n"); + ok(got_Flush, "Expected IMediaObject::Flush().\n"); got_Flush = 0;
hr = IMediaControl_GetState(control, 0, &state); @@ -1267,7 +1267,7 @@ static void test_filter_state(IMediaControl *control) ok(!got_Flush, "Unexpected IMediaObject::Flush().\n"); hr = IMediaControl_Stop(control); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(got_Flush, "Expected IMediaObject::Flush().\n"); + ok(got_Flush, "Expected IMediaObject::Flush().\n"); got_Flush = 0;
hr = IMediaControl_GetState(control, 0, &state);