Seek is not implemented but not completing the command makes pending or later queued commands to not be executed.
This partially fixes Guilty Gear Strive being stuck on character selection screen.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
Of course implementing seek is probably better, but in the meantime this prevents further commands to be possibly ignored.
dlls/mf/session.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 8d9325abc53..08f3f48f030 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -806,6 +806,8 @@ static struct topo_node *session_get_node_by_id(const struct media_session *sess return NULL; }
+static void session_command_complete(struct media_session *session); + static void session_start(struct media_session *session, const GUID *time_format, const PROPVARIANT *start_position) { struct media_source *source; @@ -840,6 +842,7 @@ static void session_start(struct media_session *session, const GUID *time_format break; case SESSION_STATE_STARTED: FIXME("Seeking is not implemented.\n"); + session_command_complete(session); break; case SESSION_STATE_CLOSED: IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MESessionStarted, &GUID_NULL,
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;
On 6/22/21 4:01 PM, Rémi Bernon wrote:
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;
Please ignore this, the issue is actually already fixed since 09bb5d949f4b51dda736acabd99684dcc46a2861.
This commit (or the few ones before) also somehow makes the game not fall into the "Seeking not implemented" codepath anymore, addressed by first patch, but I still believe it should complete the command to process the next one nonetheless.
On 6/22/21 5:01 PM, Rémi Bernon wrote:
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.
Yes, something is not right, I'll have to experiment with finalization step again, I don't remember how it works now.