1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

evr: Respect RGB format stride in GetCurrentImage.

This commit is contained in:
Rémi Bernon 2023-05-26 11:13:49 +02:00 committed by Alexandre Julliard
parent df91b31428
commit 486531ca8a
2 changed files with 3 additions and 3 deletions

View File

@ -1531,7 +1531,8 @@ static HRESULT WINAPI video_presenter_control_GetCurrentImage(IMFVideoDisplayCon
{
if (SUCCEEDED(hr = IDirect3DSurface9_LockRect(readback, &mapped_rect, NULL, D3DLOCK_READONLY)))
{
memcpy(*dib, mapped_rect.pBits, *dib_size);
hr = MFCopyImage(stride < 0 ? *dib + *dib_size + stride : *dib, stride,
mapped_rect.pBits, mapped_rect.Pitch, abs(stride), surface_desc.Height);
IDirect3DSurface9_UnlockRect(readback);
}
}

View File

@ -3466,8 +3466,7 @@ static void test_presenter_orientation(const GUID *subtype)
SetRect(&rect, 0, 0, header.biWidth, header.biHeight);
diff = check_rgb32_data(L"rgb32frame-flip.bmp", data, header.biSizeImage, &rect);
todo_wine
ok(diff <= 3, "Unexpected %lu%% diff\n", diff);
ok(diff <= 5, "Unexpected %lu%% diff\n", diff);
CoTaskMemFree(data);
hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_ENDSTREAMING, 0);