[PATCH 2/2] mf: Finalize sinks right after they have been stopped.

Rémi Bernon rbernon at codeweavers.com
Tue Jun 22 10:11:27 CDT 2021


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 at 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.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list