As session_set_source_object_state does not call session_finalize_sinks if session is already stopped.
Guilty Gear Strive otherwise gets stuck on character selection screen as it waits for the MESessionClosed event forever.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
I'm not completely sure about the logic here. Maybe we should instead make session_set_source_object_state with SESSION_STATE_STOPPED state and SESSION_FLAG_FINALIZE_SINKS flag call session_finalize_sinks, or instead make sure to force session state after session_set_stopped call to SESSION_STATE_STOPPING_SOURCES here.
dlls/mf/session.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 08f3f48f030..acbcf9f30e2 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -2587,7 +2587,11 @@ static void session_set_sink_stream_state(struct media_session *session, IMFStre break; }
- if (session->presentation.flags & SESSION_FLAG_END_OF_PRESENTATION || FAILED(hr)) + if (FAILED(hr)) + session_set_stopped(session, hr); + else if (session->presentation.flags & SESSION_FLAG_FINALIZE_SINKS) + session_finalize_sinks(session); + else if (session->presentation.flags & SESSION_FLAG_END_OF_PRESENTATION) session_set_stopped(session, hr);
break;