quartz/filtergraph: Pause the graph even if AM_SEEKING_NoFlush is used.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
facbd0585c
commit
13dbe644ce
|
@ -2583,7 +2583,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG *
|
|||
EnterCriticalSection(&graph->cs);
|
||||
|
||||
state = graph->state;
|
||||
if (state == State_Running && !(current_flags & AM_SEEKING_NoFlush))
|
||||
if (state == State_Running)
|
||||
IMediaControl_Pause(&graph->IMediaControl_iface);
|
||||
|
||||
LIST_FOR_EACH_ENTRY(filter, &graph->filters, struct filter, entry)
|
||||
|
@ -2616,7 +2616,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG *
|
|||
if ((current_flags & 0x7) != AM_SEEKING_NoPositioning)
|
||||
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);
|
||||
|
||||
LeaveCriticalSection(&graph->cs);
|
||||
|
|
|
@ -3917,6 +3917,14 @@ static void test_graph_seeking(void)
|
|||
"Expected about 1234ms, got %s.\n", wine_dbgstr_longlong(current));
|
||||
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, ¤t,
|
||||
AM_SEEKING_AbsolutePositioning | AM_SEEKING_NoFlush,
|
||||
&stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_NoFlush);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
Sleep(100);
|
||||
|
||||
hr = IMediaSeeking_GetCurrentPosition(seeking, &time);
|
||||
|
@ -3928,7 +3936,7 @@ static void test_graph_seeking(void)
|
|||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(abs(current - 1334 * 10000) < 40 * 10000,
|
||||
"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);
|
||||
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
@ -3946,7 +3954,7 @@ static void test_graph_seeking(void)
|
|||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
todo_wine ok(abs(current - 1334 * 10000) < 40 * 10000,
|
||||
"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);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
|
Loading…
Reference in New Issue