Nikolay Sivov (@nsivov) commented about dlls/mfreadwrite/writer.c:
- if (FAILED(hr = stream_get_type(stream, &stream_type))
|| FAILED(hr = IMFMediaType_IsEqual(type, stream_type, &flags)))
goto done;
- if (!(flags & MF_MEDIATYPE_EQUAL_MAJOR_TYPES))
- {
hr = MF_E_INVALIDMEDIATYPE;
goto done;
- }
- /* Types are not compatible, create transforms. */
- if (!(flags & MF_MEDIATYPE_EQUAL_FORMAT_DATA))
- {
/* Try only using converter first, then try again with encoder. */
if (FAILED(hr = stream_create_transforms(stream, type, stream_type, FALSE)))
hr = stream_create_transforms(stream, type, stream_type, TRUE);
To the previous question, according to this logic you can create just a converter? Does it still get index 1 in GetTransformForStream() ?