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.
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);
This makes sense to me, although I'm not sure what the implications of changing this might be due to having little experience with quartz.
Yeah. It's not quite obvious that this is actually the right thing to do (native doesn't always do the sensible thing), but a manual test bears it out, as attached. It could be made into an automatic test, but it's timing-dependent enough that I'm hesitant to do so.
This merge request was approved by Elizabeth Figura.