[PATCH 0/1] MR7965: quartz: Clamp MediaSeeking_GetCurrentPosition to the stop position.
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. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7965
From: Alex Henrie <alexhenrie24(a)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); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7965
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. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7965#note_102528
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. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7965#note_102598
This merge request was approved by Elizabeth Figura. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7965
participants (4)
-
Alex Henrie -
Alex Henrie (@alexhenrie) -
Connor McAdams (@cmcadams) -
Elizabeth Figura (@zfigura)