Module: wine
Branch: master
Commit: 97d4c7fe3f5a4743f5949e8544c88a807ecebb42
URL: https://gitlab.winehq.org/wine/wine/-/commit/97d4c7fe3f5a4743f5949e8544c88a…
Author: Yuxuan Shui <yshui(a)codeweavers.com>
Date: Wed Feb 7 15:38:26 2024 +0000
mf: Only preroll when starting from stopped state.
Stream sink such as evr can't be prerolled a second time, and when we are
restarting from a paused state, those stream sink will already be prerolled
so don't preroll them again. Otherwise we will be waiting for Prerolled
events that will never come.
---
dlls/mf/session.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index b5472569595..9074ad2de25 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -2979,7 +2979,7 @@ static void session_set_source_object_state(struct media_session *session, IUnkn
return;
}
- if (session->presentation.flags & SESSION_FLAG_NEEDS_PREROLL)
+ if ((session->presentation.flags & SESSION_FLAG_NEEDS_PREROLL) && session_is_output_nodes_state(session, OBJ_STATE_STOPPED))
{
MFTIME preroll_time = 0;