20 Mar
2024
20 Mar
'24
9:09 p.m.
Nikolay Sivov (@nsivov) commented about dlls/mfplat/mediatype.c:
+ HRESULT hr; + + if (FAILED(hr = MFCreateMediaType(media_type))) + return hr; + + if (IsEqualGUID(&guid_representation, &AM_MEDIA_TYPE_REPRESENTATION)) + hr = MFInitMediaTypeFromAMMediaType(*media_type, representation); + + if (FAILED(hr)) + { + IMFMediaType_Release(*media_type); + *media_type = NULL; + } + + return hr; +} Let's add a fixme for unrecognized representation guids. A simple test would be helpful too, maybe we should simply fail, and that will remove some branching as well.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5362#note_65534