[PATCH] wmp/tests: Stop crash when setting a media option.
Jacek Caban
jacek at codeweavers.com
Thu Mar 29 08:46:06 CDT 2018
Hi Alistair,
diff --git a/dlls/wmp/tests/oleobj.c b/dlls/wmp/tests/oleobj.c
index e4c2294436..58ba6081b1 100644
--- a/dlls/wmp/tests/oleobj.c
+++ b/dlls/wmp/tests/oleobj.c
@@ -970,10 +970,13 @@ static void test_wmp_ifaces(IOleObject *oleobj)
ok(0 == lstrcmpW(url, filename), "%s != %s\n", wine_dbgstr_w(url), wine_dbgstr_w(filename));
SysFreeString(url);
+ /* Keep a reference since we are using the same media object, stops a crash (w2003std, wvistau64) */
+ IWMPMedia_AddRef(media);
SET_EXPECT(GetContainer);
hres = IWMPPlayer4_put_currentMedia(player4, media);
ok(hres == S_OK, "put_currentMedia failed: %08x\n", hres);
todo_wine CHECK_CALLED_OR_BROKEN(GetContainer);
+ IWMPMedia_Release(media);
IWMPMedia_Release(media);
Note that we already hold reference to media interface, so this should not be needed. If the patch helps, it means that we have a problem with ref counting somewhere else or Windows implementation is somehow broken. Given that the problem is visible only on one platform, I suspect the later. Maybe we should skip WMP tests on this platform?
Thanks,
Jacek
More information about the wine-devel
mailing list