Akihiro Sagawa : quartz: Fix a race in IMediaFilter::Pause().

Alexandre Julliard julliard at winehq.org
Fri Dec 10 15:07:53 CST 2021


Module: wine
Branch: master
Commit: bbdb6584026393ef1159bd841b61abcad0f1e247
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=bbdb6584026393ef1159bd841b61abcad0f1e247

Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date:   Fri Dec 10 23:58:15 2021 +0900

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 <sagawa.aki at gmail.com>
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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);




More information about the wine-cvs mailing list