Commit 21bbd34d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mf/tests: Fully cleanup when skipping tests.

parent 7aa982f8
......@@ -3733,6 +3733,23 @@ static void test_topology_loader_evr(void)
hr = CoInitialize(NULL);
ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
/* EVR sink node. */
window = create_window();
hr = MFCreateVideoRendererActivate(window, &activate);
ok(hr == S_OK, "Failed to create activate object, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink);
if (FAILED(hr))
{
skip("Failed to create an EVR sink, skipping tests.\n");
DestroyWindow(window);
IMFActivate_Release(activate);
CoUninitialize();
return;
}
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateTopoLoader(&loader);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
......@@ -3749,21 +3766,6 @@ static void test_topology_loader_evr(void)
IMFPresentationDescriptor_Release(pd);
IMFStreamDescriptor_Release(sd);
/* EVR sink node. */
window = create_window();
hr = MFCreateVideoRendererActivate(window, &activate);
ok(hr == S_OK, "Failed to create activate object, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink);
if (FAILED(hr))
{
skip("Failed to create an EVR sink, skipping tests.\n");
DestroyWindow(window);
IMFActivate_Release(activate);
return;
}
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkById(sink, 0, &stream_sink);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment