From bbdb6584026393ef1159bd841b61abcad0f1e247 Mon Sep 17 00:00:00 2001 From: Akihiro Sagawa Date: Fri, 10 Dec 2021 23:58:15 +0900 Subject: [PATCH] quartz: Fix a race in IMediaFilter::Pause(). Before finishing async run, graph->stream_start isn't stable. This will cause graph->current_pos to be out of playback duration. Since graph->current_pos is out of the range, the playback will be stopped. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52200 Signed-off-by: Akihiro Sagawa Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/quartz/filtergraph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 4351eaaffef..d20687c1b38 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -5044,7 +5044,7 @@ static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface) if (graph->defaultclock && !graph->refClock) IFilterGraph2_SetDefaultSyncSource(&graph->IFilterGraph2_iface); - if (graph->state == State_Running && graph->refClock) + if (graph->state == State_Running && !graph->needs_async_run && graph->refClock) { REFERENCE_TIME time; IReferenceClock_GetTime(graph->refClock, &time); -- 2.11.4.GIT