mf/tests: Avoid crashing if MF_BYTESTREAM_EFFECTIVE_URL is missing.

Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=55588
This commit is contained in:
Rémi Bernon 2023-10-27 09:21:53 +02:00 committed by Alexandre Julliard
parent 48cebe2b91
commit d0400e5637

View file

@ -6485,9 +6485,11 @@ static void test_scheme_resolvers(void)
PropVariantInit(&propvar);
hr = IMFAttributes_GetItem(attributes, &MF_BYTESTREAM_EFFECTIVE_URL, &propvar);
ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Win7 */, "got hr %#lx\n", hr);
ok(!wcsncmp(expect_domain[i], propvar.pwszVal, wcslen(expect_domain[i]))
|| broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Win7 */,
"got url %s\n", debugstr_w(propvar.pwszVal));
if (hr == S_OK)
{
ok(!wcsncmp(expect_domain[i], propvar.pwszVal, wcslen(expect_domain[i])),
"got url %s\n", debugstr_w(propvar.pwszVal));
}
hr = PropVariantClear(&propvar);
ok(hr == S_OK, "got hr %#lx\n", hr);