Commit 33a4151b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mf: Partially implement Shutdown() for media session.

parent 05d76e7c
......@@ -62,6 +62,7 @@ struct media_session
IMFMediaEventQueue *event_queue;
IMFPresentationClock *clock;
struct list topologies;
BOOL is_shut_down;
CRITICAL_SECTION cs;
};
......@@ -412,12 +413,21 @@ static HRESULT WINAPI mfsession_Close(IMFMediaSession *iface)
static HRESULT WINAPI mfsession_Shutdown(IMFMediaSession *iface)
{
struct media_session *session = impl_from_IMFMediaSession(iface);
HRESULT hr = S_OK;
FIXME("(%p)\n", iface);
IMFMediaEventQueue_Shutdown(session->event_queue);
EnterCriticalSection(&session->cs);
if (session->is_shut_down)
hr = MF_E_SHUTDOWN;
else
{
session->is_shut_down = TRUE;
IMFMediaEventQueue_Shutdown(session->event_queue);
}
LeaveCriticalSection(&session->cs);
return E_NOTIMPL;
return hr;
}
static HRESULT WINAPI mfsession_GetClock(IMFMediaSession *iface, IMFClock **clock)
......
......@@ -944,7 +944,6 @@ static void test_session_events(IMFMediaSession *session)
/* Shutdown behavior. */
hr = IMFMediaSession_Shutdown(session);
todo_wine
ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment