From: Alex Henrie alexhenrie24@gmail.com
test_graph_seeking sets the stop time to 6 seconds and then checks that the media has stopped at that exact point in time. That test failed 10 out of the last 67 times on test.winehq.org because IMediaSeeking_GetCurrentPosition returned a time that was 1 millisecond after the stop time. To make the test pass consistently, clamp the current time to the stop time. --- dlls/quartz/filtergraph.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index fd5ec5bf348..aee519ecbb7 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2382,7 +2382,11 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG REFERENCE_TIME time; IReferenceClock_GetTime(graph->refClock, &time); if (time) + { ret += time - graph->stream_start; + if (ret > graph->stream_stop) + ret = graph->stream_stop; + } }
LeaveCriticalSection(&graph->cs);