From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/mfreadwrite/tests/mfplat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/mfreadwrite/tests/mfplat.c b/dlls/mfreadwrite/tests/mfplat.c index 42b58e878cb..4123d76fc77 100644 --- a/dlls/mfreadwrite/tests/mfplat.c +++ b/dlls/mfreadwrite/tests/mfplat.c @@ -571,8 +571,6 @@ 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, "Unexpected hr %#lx.\n", hr); @@ -582,8 +580,6 @@ static void test_factory(void) ok(hr == CLASS_E_NOAGGREGATION, "Unexpected hr %#lx.\n", hr);
IMFReadWriteClassFactory_Release(factory); - - CoUninitialize(); }
struct async_callback @@ -1531,6 +1527,8 @@ START_TEST(mfplat) { HRESULT hr;
+ CoInitialize(NULL); + hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
@@ -1547,4 +1545,6 @@ START_TEST(mfplat)
hr = MFShutdown(); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + + CoUninitialize(); }
I see, so it would've worked if new test was running after test_factory(). Could you just reorder them, with corresponding comment in the code, or commit message? So that we don't lose this information.
So you don't want the global CoInitialize?
The tes_factory does a CoUninitialize so we mightt just end up in the same issue.
Following tests worked before this change, so I assumed it was enough.