[PATCH 0/1] MR10667: mfplat: Support FORMAT_MFVideoFormat in MFInitMediaTypeFromAMMediaType.
From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/mfplat/mediatype.c | 3 +++ dlls/mfplat/tests/mfplat.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c index 10a92ad7464..8f0e38d948d 100644 --- a/dlls/mfplat/mediatype.c +++ b/dlls/mfplat/mediatype.c @@ -4405,6 +4405,9 @@ HRESULT WINAPI MFInitMediaTypeFromAMMediaType(IMFMediaType *media_type, const AM else if (IsEqualGUID(&am_type->formattype, &FORMAT_MPEG2Video) && am_type->cbFormat >= sizeof(MPEG2VIDEOINFO)) hr = MFInitMediaTypeFromMPEG2VideoInfo(media_type, (MPEG2VIDEOINFO *)am_type->pbFormat, am_type->cbFormat, subtype); + else if (IsEqualGUID(&am_type->formattype, &FORMAT_MFVideoFormat) + && am_type->cbFormat >= sizeof(MFVIDEOFORMAT)) + hr = MFInitMediaTypeFromMFVideoFormat(media_type, (MFVIDEOFORMAT *)am_type->pbFormat, am_type->cbFormat); else { FIXME("Unsupported format type %s / size %ld.\n", debugstr_guid(&am_type->formattype), am_type->cbFormat); diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index c9514293c49..1d7c5e45465 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -9336,10 +9336,10 @@ static void test_MFInitAMMediaTypeFromMFMediaType(void) hr = MFInitAMMediaTypeFromMFMediaType(media_type, FORMAT_MFVideoFormat, &am_type); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = MFInitMediaTypeFromAMMediaType(other_type, &am_type); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_GetAllocatedBlob(other_type, &MF_MT_MINIMUM_DISPLAY_APERTURE, (BYTE **)&area, &value32); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) CoTaskMemFree(area); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + CoTaskMemFree(area); IMFMediaType_DeleteAllItems(other_type); CoTaskMemFree(am_type.pbFormat); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10667
This merge request was approved by Nikolay Sivov. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10667
participants (3)
-
Nikolay Sivov (@nsivov) -
Rémi Bernon -
Rémi Bernon (@rbernon)