Commit 4bca67bd authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfreadwrite/tests: Initialize COM only for tests that need it.

parent b91fbb1c
......@@ -96,6 +96,8 @@ static void test_factory(void)
IMFReadWriteClassFactory *factory, *factory2;
HRESULT hr;
CoInitialize(NULL);
hr = CoCreateInstance(&CLSID_MFReadWriteClassFactory, NULL, CLSCTX_INPROC_SERVER, &IID_IMFReadWriteClassFactory,
(void **)&factory);
ok(hr == S_OK, "Failed to create class factory, hr %#x.\n", hr);
......@@ -105,14 +107,14 @@ static void test_factory(void)
ok(hr == CLASS_E_NOAGGREGATION, "Unexpected hr %#x.\n", hr);
IMFReadWriteClassFactory_Release(factory);
CoUninitialize();
}
START_TEST(mfplat)
{
HRESULT hr;
CoInitialize(NULL);
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL);
ok(hr == S_OK, "got 0x%08x\n", hr);
......@@ -122,6 +124,4 @@ START_TEST(mfplat)
test_factory();
MFShutdown();
CoUninitialize();
}
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