Commit f5ace38a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mf: Do not touch clock state when setting rate.

parent 02613046
......@@ -2978,7 +2978,8 @@ static HRESULT clock_change_state(struct presentation_clock *clock, enum clock_c
return hr;
old_state = clock->state;
clock->state = states[command];
if (command != CLOCK_CMD_SET_RATE)
clock->state = states[command];
/* Dump all pending timer requests immediately on start; otherwise try to cancel scheduled items when
transitioning from running state. */
......
......@@ -1797,6 +1797,10 @@ static void test_presentation_clock(void)
hr = IMFRateControl_SetRate(rate_control, TRUE, -1.0f);
ok(hr == MF_E_THINNING_UNSUPPORTED, "Unexpected hr %#x.\n", hr);
hr = IMFPresentationClock_GetState(clock, 0, &state);
ok(hr == S_OK, "Failed to get clock state, hr %#x.\n", hr);
ok(state == MFCLOCK_STATE_RUNNING, "Unexpected state %d.\n", state);
hr = IMFRateControl_GetRate(rate_control, &thin, &rate);
ok(hr == S_OK, "Failed to get clock rate, hr %#x.\n", hr);
ok(rate == 0.5f, "Unexpected rate.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment