Nikolay Sivov (@nsivov) commented about dlls/mfmediaengine/tests/mfmediaengine.c:
goto no_more_types;
MFCreateMediaType(&mt);
IMFMediaType_SetGUID(mt, &MF_MT_MAJOR_TYPE, &MFMediaType_Video);
IMFMediaType_SetGUID(mt, &MF_MT_SUBTYPE, media_subtypes[index]);
*type = mt;
- }
- LeaveCriticalSection(&impl->cs);
- return S_OK;
+no_more_types:
- LeaveCriticalSection(&impl->cs);
- return MF_E_NO_MORE_TYPES;
+}
I don't think you need that, take a look what copier mft does. You should be able to return nonspecific video mediatype and a single available type.