From: Conor McCarthy cmccarthy@codeweavers.com
--- dlls/mf/session.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 076188b3e23..3af59fc870f 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -1049,6 +1049,16 @@ static void session_handle_source_shutdown(struct media_session *session) LeaveCriticalSection(&session->cs); }
+static void session_handle_start_error(struct media_session *session, HRESULT hr) +{ + if (hr == MF_E_SHUTDOWN) + { + session_reset(session); + hr = MF_E_INVALIDREQUEST; + } + session_command_complete_with_event(session, MESessionStarted, hr, NULL); +} + static void session_start(struct media_session *session, const GUID *time_format, const PROPVARIANT *start_position) { struct media_source *source; @@ -1077,7 +1087,7 @@ static void session_start(struct media_session *session, const GUID *time_format
if (FAILED(hr = session_subscribe_sources(session))) { - session_command_complete_with_event(session, MESessionStarted, hr, NULL); + session_handle_start_error(session, hr); return; }