[PATCH 3/5] quartz/filtergraph: Set the current position in IMediaFilter::Stop().
Zebediah Figura
z.figura12 at gmail.com
Mon Oct 21 16:54:49 CDT 2019
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
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, ¤t, &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);
--
2.20.1
More information about the wine-devel
mailing list