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 | 3 +++ dlls/mf/tests/mf.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 095dfad3107..e0d94c8327f 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -5018,6 +5018,9 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses goto failed; } + if (FAILED(hr = IMFRateControl_GetRate(object->clock_rate_control, NULL, &object->presentation.rate))) + goto failed; + if (config) { GUID clsid; diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index c4ca2b8b49c..6fe6a81e6f0 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -10975,14 +10975,12 @@ 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_GetPresentationClock); todo_wine CHECK_CALLED(test_transform_ProcessMessage_START_OF_STREAM); - 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