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.
Split from !4545, splitting the fix from the tests because turns out the tests are contentious.
-- v2: mf: Only preroll when starting from stopped state.
From: Yuxuan Shui yshui@codeweavers.com
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;
This merge request was approved by Nikolay Sivov.