Nikolay Sivov (@nsivov) commented about dlls/mfreadwrite/reader.c:
+ if (SUCCEEDED(hr)) + { + GUID major_type, subtype; + UINT64 frame_size; + LONG stride; + + type = reader->streams[index].current; + + if (SUCCEEDED(IMFMediaType_GetMajorType(type, &major_type)) + && IsEqualGUID(&major_type, &MFMediaType_Video) + && SUCCEEDED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype)) + && SUCCEEDED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &frame_size)) + && SUCCEEDED(MFGetStrideForBitmapInfoHeader(subtype.Data1, frame_size >> 32, &stride))) + IMFMediaType_SetUINT32(type, &MF_MT_DEFAULT_STRIDE, abs(stride)); + } + If we really need this it should go to helpers where type is set from the source or from a transform. Right now it looks like a workaround to me. How can we be sure that it's a reader responsibility to modify type like this, and not something missing in source/transform?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8172#note_104909