From: Santino Mazza smazza@codeweavers.com
--- dlls/mf/session.c | 4 ++-- dlls/mf/tests/mf.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 3c989249229..71fe6179d03 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -861,8 +861,6 @@ static void session_clear_presentation(struct media_session *session) struct media_sink *sink, *sink2; struct topo_node *node, *node2;
- session_shutdown_current_topology(session); - IMFTopology_Clear(session->presentation.current_topology); session->presentation.topo_status = MF_TOPOSTATUS_INVALID; session->presentation.flags = 0; @@ -2117,6 +2115,7 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface) if (!refcount) { session_clear_queued_topologies(session); + session_shutdown_current_topology(session); session_clear_presentation(session); session_clear_command_list(session); if (session->presentation.current_topology) @@ -2397,6 +2396,7 @@ static HRESULT WINAPI mfsession_Shutdown(IMFMediaSession *iface) MFShutdownObject((IUnknown *)session->clock); IMFPresentationClock_Release(session->clock); session->clock = NULL; + session_shutdown_current_topology(session); session_clear_presentation(session); session_clear_queued_topologies(session); session_submit_simple_command(session, SESSION_CMD_SHUTDOWN); diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index c78be7b5a7d..b31cb3732cc 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -2727,7 +2727,7 @@ static void test_media_session_topologies(void) PropVariantClear(&pv);
hr = wait_media_event_until_blocking(session, callback, MESessionEnded, 1000, &pv); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(pv.vt == VT_EMPTY, "got vt %u\n", pv.vt); ok(pv.punkVal != (IUnknown *)topology, "got punkVal %p\n", pv.punkVal); PropVariantClear(&pv);