Akihiro Sagawa : quartz: Fix a race in IMediaFilter::Pause().
Alexandre Julliard
julliard at winehq.org
Tue Apr 12 13:38:04 CDT 2022
Module: wine
Branch: oldstable
Commit: 4642de1d6c9e287a25d1609630335e6d599cd5fc
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4642de1d6c9e287a25d1609630335e6d599cd5fc
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>
(cherry picked from commit bbdb6584026393ef1159bd841b61abcad0f1e247)
Signed-off-by: Michael Stefaniuc <mstefani 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 20eec80e00c..e6eea7e18ac 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -5038,7 +5038,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