On Mon Aug 29 20:13:37 2022 +0000, **** wrote:
Zebediah Figura replied on the mailing list:
On 8/29/22 09:39, Nikolay Sivov wrote: > @@ -296,6 +299,15 @@ static void test_interfaces(void) > check_interface(filter, &IID_IReferenceClock, FALSE); > check_interface(filter, &IID_IVideoWindow, FALSE); > > + /* The scope of IMediaEventSink */ > + hr = IBaseFilter_QueryInterface(filter, &IID_IMediaEventSink, (void **)&unk); > + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); > + hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter2); > + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); > + ok(filter == filter2, "Unexpected pointer.\n"); > + IBaseFilter_Release(filter2); > + IUnknown_Release(unk); > + > ref = IBaseFilter_Release(filter); > ok(!ref, "Got unexpected refcount %ld.\n", ref); > } Somewhat out of curiosity, why this test?
It's done differently in mf/evr.c where this interface is not exposed, except during InitServices(). The test was to show that it's done in a usual way in this case.