Commit 13dbe644 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz/filtergraph: Pause the graph even if AM_SEEKING_NoFlush is used.

parent facbd058
...@@ -2583,7 +2583,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * ...@@ -2583,7 +2583,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG *
EnterCriticalSection(&graph->cs); EnterCriticalSection(&graph->cs);
state = graph->state; state = graph->state;
if (state == State_Running && !(current_flags & AM_SEEKING_NoFlush)) if (state == State_Running)
IMediaControl_Pause(&graph->IMediaControl_iface); IMediaControl_Pause(&graph->IMediaControl_iface);
LIST_FOR_EACH_ENTRY(filter, &graph->filters, struct filter, entry) LIST_FOR_EACH_ENTRY(filter, &graph->filters, struct filter, entry)
...@@ -2616,7 +2616,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * ...@@ -2616,7 +2616,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG *
if ((current_flags & 0x7) != AM_SEEKING_NoPositioning) if ((current_flags & 0x7) != AM_SEEKING_NoPositioning)
graph->pause_time = graph->start_time = -1; graph->pause_time = graph->start_time = -1;
if (state == State_Running && !(current_flags & AM_SEEKING_NoFlush)) if (state == State_Running)
IMediaControl_Run(&graph->IMediaControl_iface); IMediaControl_Run(&graph->IMediaControl_iface);
LeaveCriticalSection(&graph->cs); LeaveCriticalSection(&graph->cs);
......
...@@ -3917,6 +3917,14 @@ static void test_graph_seeking(void) ...@@ -3917,6 +3917,14 @@ static void test_graph_seeking(void)
"Expected about 1234ms, got %s.\n", wine_dbgstr_longlong(current)); "Expected about 1234ms, got %s.\n", wine_dbgstr_longlong(current));
ok(stop == 9000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); ok(stop == 9000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
/* This remains true even if NoFlush is specified. */
current = 1000 * 10000;
stop = 8000 * 10000;
hr = IMediaSeeking_SetPositions(seeking, &current,
AM_SEEKING_AbsolutePositioning | AM_SEEKING_NoFlush,
&stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_NoFlush);
ok(hr == S_OK, "Got hr %#x.\n", hr);
Sleep(100); Sleep(100);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); hr = IMediaSeeking_GetCurrentPosition(seeking, &time);
...@@ -3928,7 +3936,7 @@ static void test_graph_seeking(void) ...@@ -3928,7 +3936,7 @@ static void test_graph_seeking(void)
ok(hr == S_OK, "Got hr %#x.\n", hr); ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(abs(current - 1334 * 10000) < 40 * 10000, ok(abs(current - 1334 * 10000) < 40 * 10000,
"Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current)); "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current));
ok(stop == 9000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); ok(stop == 8000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
hr = IMediaControl_Pause(control); hr = IMediaControl_Pause(control);
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
...@@ -3946,7 +3954,7 @@ static void test_graph_seeking(void) ...@@ -3946,7 +3954,7 @@ static void test_graph_seeking(void)
ok(hr == S_OK, "Got hr %#x.\n", hr); ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(abs(current - 1334 * 10000) < 40 * 10000, todo_wine ok(abs(current - 1334 * 10000) < 40 * 10000,
"Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current)); "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current));
ok(stop == 9000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop)); ok(stop == 8000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
hr = IMediaControl_Stop(control); hr = IMediaControl_Stop(control);
ok(hr == S_OK, "Got hr %#x.\n", hr); ok(hr == S_OK, "Got hr %#x.\n", hr);
......
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