Zebediah Figura : quartz/tests: Test releasing the graph while waiting for an asynchronous paused -> running transition.

Alexandre Julliard julliard at winehq.org
Mon Nov 9 15:11:50 CST 2020


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Fri Nov  6 13:46:06 2020 -0600

quartz/tests: Test releasing the graph while waiting for an asynchronous paused -> running transition.

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

---

 dlls/quartz/tests/filtergraph.c | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index 20a730f6aa0..4d2a3195b6d 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -3613,6 +3613,27 @@ todo_wine
     ok(sink.state == State_Stopped, "Got state %u.\n", sink.state);
     ok(source.state == State_Stopped, "Got state %u.\n", source.state);
 
+    /* Same, but tear down the graph instead. */
+
+    sink.state_hr = S_FALSE;
+    sink.GetState_hr = VFW_S_STATE_INTERMEDIATE;
+    hr = IMediaControl_Run(control);
+    ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+
+    IMediaFilter_Release(filter);
+    IMediaControl_Release(control);
+    IMediaSeeking_Release(seeking);
+    ref = IFilterGraph2_Release(graph);
+    ok(!ref, "Got outstanding refcount %d.\n", ref);
+
+    graph = create_graph();
+    IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter);
+    IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
+    IFilterGraph2_QueryInterface(graph, &IID_IMediaSeeking, (void **)&seeking);
+    IFilterGraph2_AddFilter(graph, &sink.IBaseFilter_iface, NULL);
+    IFilterGraph2_AddFilter(graph, &source.IBaseFilter_iface, NULL);
+    IPin_Connect(&source_pin.IPin_iface, &sink_pin.IPin_iface, NULL);
+
     /* This logic doesn't apply when using IMediaFilter methods directly. */
 
     source.expect_run_prev = sink.expect_run_prev = State_Stopped;
@@ -3692,11 +3713,6 @@ todo_wine
     hr = IMediaControl_Run(control);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
     check_filter_state(graph, State_Running);
-todo_wine
-    ok(source.start_time > 0 && source.start_time < 500 * 10000,
-        "Got time %s.\n", wine_dbgstr_longlong(source.start_time));
-    ok(sink.start_time == source.start_time, "Expected time %s, got %s.\n",
-        wine_dbgstr_longlong(source.start_time), wine_dbgstr_longlong(sink.start_time));
 
     source.expect_stop_prev = sink.expect_stop_prev = State_Running;
     IMediaFilter_Release(filter);




More information about the wine-cvs mailing list