Module: wine
Branch: master
Commit: 20c4896b125c7926e57091aa3dbd82a6af1d2be4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=20c4896b125c7926e57091aa…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com>
Date: Tue Mar 15 14:29:21 2022 +0100
mfplat: Align buffers at no less than 16 bytes boundaries.
This is what seems to be happening on Windows 10. On the other hand, I
am not seeing on native the current behavior of interpreting a zero
alignment parameter as a request to align to 64 bytes boundaries.
Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/mfplat/buffer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/mfplat/buffer.c b/dlls/mfplat/buffer.c
index e3f863c6345..18c77c87ec2 100644
--- a/dlls/mfplat/buffer.c
+++ b/dlls/mfplat/buffer.c
@@ -1264,7 +1264,8 @@ static HRESULT memory_buffer_init(struct buffer *buffer, DWORD max_length, DWORD
{
size_t size;
- if (!alignment) alignment = MF_64_BYTE_ALIGNMENT;
+ if (alignment < MF_16_BYTE_ALIGNMENT)
+ alignment = MF_16_BYTE_ALIGNMENT;
alignment++;
if (alignment & (alignment - 1))