[PATCH] quartz: Allow time format change while running

Andrew Eikum aeikum at codeweavers.com
Mon Nov 29 09:05:10 CST 2021


Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
---
 dlls/quartz/filtergraph.c       | 3 ---
 dlls/quartz/tests/filtergraph.c | 6 ++++++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 47b9da9510b..4351eaaffef 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -2213,9 +2213,6 @@ static HRESULT WINAPI MediaSeeking_SetTimeFormat(IMediaSeeking *iface, const GUI
 
     TRACE("(%p/%p)->(%s)\n", This, iface, debugstr_guid(pFormat));
 
-    if (This->state != State_Stopped)
-        return VFW_E_WRONG_STATE;
-
     if (!IsEqualGUID(&TIME_FORMAT_MEDIA_TIME, pFormat))
     {
         FIXME("Unhandled time format %s\n", debugstr_guid(pFormat));
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index fef7b972fac..a83bfde0806 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -4930,6 +4930,12 @@ static void test_graph_seeking(void)
     ok(hr == S_OK, "Got hr %#x.\n", hr);
     ok(time == 6000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(time));
 
+    hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME);
+    ok(hr == S_OK, "Got hr %#x.\n", hr);
+
+    hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_NONE);
+    todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+
     hr = IMediaControl_Stop(control);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
 
-- 
2.34.0




More information about the wine-devel mailing list