[PATCH] quartz: Return the paused timestamp from IMediaSeeking::GetCurrentPosition() if the graph is running asynchronously.

Zebediah Figura z.figura12 at gmail.com
Tue Oct 20 16:42:57 CDT 2020


In this case "graph->stream_start" has not yet been set.

This fixes a regression with Blazblue Centralfiction, which incorrectly skipped
a video. The application called IMediaControl::Run() and
IMediaSeeking::GetCurrentPosition() in quick succession, received an incorrect
value for the latter, and consequently believed that the video had already
finished.

Fixes: 114832224fc5babd1417562dbd64d489fabe1e01
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 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 4cef1004bdd..e5ae12d9452 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -2331,7 +2331,7 @@ static HRESULT WINAPI MediaSeeking_GetCurrentPosition(IMediaSeeking *iface, LONG
     {
         ret = graph->stream_stop;
     }
-    else if (graph->state == State_Running && graph->refClock)
+    else if (graph->state == State_Running && !graph->needs_async_run && graph->refClock)
     {
         REFERENCE_TIME time;
         IReferenceClock_GetTime(graph->refClock, &time);
-- 
2.28.0




More information about the wine-devel mailing list