April 20, 2026
9:16 p.m.
the stride is suppose to come from the `MF_MT_DEFAULT_STRIDE` attribute within the media type. Otherwise you can fallback to using `MFGetStrideForBitmapInfoHeader`.
It seems to me that this stride is more like a minimum stride. For example, for the YV12, width 162 video I used, this stride is 162, but the actual samples I got have stride 176 when locked with `IMFMediaBuffer::Lock`. I don't know how a game will figure this number out. Maybe calculate the size of the Y plane (= buffer_size / 3 * 2), then check divisibility? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10654#note_137168