Zebediah Figura : quartz/filtergraph: Set the current position in IMediaFilter::Stop().

Alexandre Julliard julliard at winehq.org
Tue Oct 22 16:57:01 CDT 2019


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Oct 21 16:54:49 2019 -0500

quartz/filtergraph: Set the current position in IMediaFilter::Stop().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/quartz/filtergraph.c       | 4 ++++
 dlls/quartz/tests/filtergraph.c | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index f7ca192c13..182ea5a2be 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -5207,6 +5207,10 @@ static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface)
     SendFilterMessage(graph, SendStop, 0);
     graph->state = State_Stopped;
 
+    /* Update the current position, probably to synchronize multiple streams. */
+    IMediaSeeking_SetPositions(&graph->IMediaSeeking_iface, &graph->current_pos,
+            AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning);
+
     LeaveCriticalSection(&graph->cs);
     return S_OK;
 }
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index d5e205ef79..4b9b3b675c 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -3952,7 +3952,7 @@ static void test_graph_seeking(void)
     ok(hr == S_OK, "Got hr %#x.\n", hr);
     hr = IMediaSeeking_GetCurrentPosition(seeking, &time);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
-    todo_wine ok(time == 12340000, "Got time %s.\n", wine_dbgstr_longlong(time));
+    ok(time == 12340000, "Got time %s.\n", wine_dbgstr_longlong(time));
 
     hr = IMediaFilter_SetSyncSource(filter, NULL);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -3968,7 +3968,7 @@ static void test_graph_seeking(void)
     hr = IMediaSeeking_GetPositions(seeking, &current, &stop);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
     todo_wine ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current));
-    todo_wine ok(!stop, "Got time %s.\n", wine_dbgstr_longlong(stop));
+    ok(!stop, "Got time %s.\n", wine_dbgstr_longlong(stop));
 
     hr = IMediaControl_Stop(control);
     ok(hr == S_OK, "Got hr %#x.\n", hr);




More information about the wine-cvs mailing list