Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com --- This doesn't really make sense to me, but it is what I am seeing on the testbot. Nikolay, have you ever seen MFGetPlaneSize return MF_E_INVALIDMEDIATYPE? --- dlls/mfplat/mediatype.c | 5 ++++- dlls/mfplat/tests/mfplat.c | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c index 41dbda572d5..4fac13db17c 100644 --- a/dlls/mfplat/mediatype.c +++ b/dlls/mfplat/mediatype.c @@ -2758,7 +2758,10 @@ HRESULT WINAPI MFGetPlaneSize(DWORD fourcc, DWORD width, DWORD height, DWORD *si subtype.Data1 = fourcc;
if (!(format = mf_get_video_format(&subtype))) - return MF_E_INVALIDMEDIATYPE; + { + *size = 0; + return S_OK; + }
stride = mf_get_stride_for_format(format, width);
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 67e81ff0821..ff703d94568 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -4183,6 +4183,14 @@ static void test_MFCalculateImageSize(void) ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Vista */, "Unexpected hr %#x.\n", hr); ok(size == 0, "Unexpected size %u.\n", size);
+ if (pMFGetPlaneSize) + { + size = 1; + hr = pMFGetPlaneSize(0xdeadbeef, 1, 1, &size); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(size == 0, "Unexpected size %u.\n", size); + } + for (i = 0; i < ARRAY_SIZE(image_size_tests); ++i) { const struct image_size_test *ptr = &image_size_tests[i];