Nikolay Sivov (@nsivov) commented about dlls/mfreadwrite/reader.c:
if (IsEqualGUID(&out_type.guidMajorType, &MFMediaType_Video)) - { category = MFT_CATEGORY_VIDEO_DECODER; - } else if (IsEqualGUID(&out_type.guidMajorType, &MFMediaType_Audio)) - { category = MFT_CATEGORY_AUDIO_DECODER; - } else - { - WARN("Unhandled major type %s.\n", debugstr_guid(&out_type.guidMajorType)); return MF_E_TOPO_CODEC_NOT_FOUND; + + if (SUCCEEDED(hr = MFTEnum(category, 0, &in_type, &out_type, NULL, &classes, &count))) + {
The `count` variable used to be zero-initialized. Could you restore that? Similarly CoTaskMemFree() was only used when count is non-zero. I don't know if we have that covered by MFTEnum() tests, but it's important to use in a compatible way, to be able to test just our mfreadwrite.dll separately, on Windows. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5120#note_62808