From: Conor McCarthy <cmccarthy@codeweavers.com> The latest argument passed to SetRate() is stored in presentation.rate, but if the client never called SetRate(), the stored rate remains zero, which results in preroll not being enabled. That could be fixed by instead calling GetRate() before enabling preroll, but always setting the stored rate reduces the risk of regression. --- dlls/mf/session.c | 1 + dlls/mf/tests/mf.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 095dfad3107..b316d11ed4e 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -4998,6 +4998,7 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses list_init(&object->presentation.sources); list_init(&object->presentation.sinks); list_init(&object->presentation.nodes); + object->presentation.rate = 1.0f; InitializeCriticalSection(&object->cs); if (FAILED(hr = MFCreateTopology(&object->presentation.current_topology))) diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 5bf3aedcd34..e72839607c2 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -10975,10 +10975,8 @@ static void test_media_session_scrubbing(void) SET_EXPECT(test_media_sink_GetStreamSinkCount); hr = WaitForSingleObject(media_sink->preroll_event, 100); - todo_wine ok(hr == WAIT_OBJECT_0, "Unexpected hr %#lx.\n", hr); - todo_wine CHECK_CALLED(test_media_sink_preroll_NotifyPreroll); hr = wait_media_event_until_blocking(session, callback, MESessionStarted, 1000, &propvar); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10754