Nikolay Sivov (@nsivov) commented about dlls/mf/tests/mf.c:
- obj_type = (MF_OBJECT_TYPE)0xdeadbeef;
- object = NULL;
- hr = IMFSourceResolver_CreateObjectFromURL(resolver, URL, MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, &object);
- ok(hr == S_OK, "Got hr %#lx.\n", hr);
- ok(obj_type == MF_OBJECT_BYTESTREAM, "Unexpected obj_type %#x.\n", obj_type);
- ptr = NULL;
- hr = IUnknown_QueryInterface(object, &IID_IMFAttributes, &ptr);
- ok(hr == S_OK, "Got hr %#lx.\n", hr);
- ok(ptr != NULL, "Got NULL ptr.\n");
- if (SUCCEEDED(hr) && ptr)
- {
IMFAttributes *attr = ptr;
UINT32 count = 0;
PROPVARIANT var;
GUID key = {0};
Let's have those variable at top level, remove indentation, and use actual variable you need instead of "ptr". It's also useful to use a bunch of check_interface() one after another so you know what needs to be supported.