On 8/30/22 06:24, Nikolay Sivov wrote:
+static HRESULT evr_connect(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt) +{ + struct evr *filter = impl_from_strmbase_renderer(iface); + IMFMediaType *media_type; + HRESULT hr; + + if (SUCCEEDED(hr = evr_test_input_type(filter, mt, &media_type)))
It's perhaps worth noting that strmbase IPin::ReceiveConnection() [which calls this function] already calls query_accept(). Granted, evr_test_input_type() is also doing some other initialization, but arguably it could be named more appropriately in that case.
+ { + if (SUCCEEDED(hr = IMFTransform_SetInputType(filter->mixer, 0, media_type, 0))) + hr = IMFVideoPresenter_ProcessMessage(filter->presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0); + + IMFMediaType_Release(media_type); }
+ return hr; +