From: Conor McCarthy <cmccarthy@codeweavers.com> --- dlls/quartz/filtergraph.c | 6 +++++- dlls/quartz/tests/filtergraph.c | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 79fcc425e53..9d57096c8eb 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2452,6 +2452,7 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG * if (state == State_Running && !graph->needs_async_run) IMediaControl_Pause(&graph->IMediaControl_iface); + /* TODO: according to native tests, filter positions should be updated per sample. */ LIST_FOR_EACH_ENTRY(filter, &graph->filters, struct filter, entry) { LONGLONG current = current_ptr ? *current_ptr : 0, stop = stop_ptr ? *stop_ptr : 0; @@ -5066,10 +5067,13 @@ static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface) struct filter_graph *graph = impl_from_IMediaFilter(iface); HRESULT hr = S_OK, filter_hr; struct filter *filter; + LONGLONG current; TP_WORK *work; TRACE("graph %p.\n", graph); + IMediaSeeking_GetCurrentPosition(&graph->IMediaSeeking_iface, ¤t); + EnterCriticalSection(&graph->cs); if (graph->state == State_Stopped) @@ -5102,7 +5106,7 @@ static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface) work = graph->async_run_work; /* Update the current position, probably to synchronize multiple streams. */ - IMediaSeeking_SetPositions(&graph->IMediaSeeking_iface, &graph->current_pos, + IMediaSeeking_SetPositions(&graph->IMediaSeeking_iface, ¤t, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); LeaveCriticalSection(&graph->cs); diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 08de3538c9a..160b216a7b2 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -6123,7 +6123,6 @@ static void test_stopped_current_position(void) hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); ok(hr == S_OK, "Got hr %#lx.\n", hr); - todo_wine ok(current >= 24700000 && current < 25200000, "Got current %I64d.\n", current); IMediaSeeking_Release(seeking); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10885