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.