Module: wine Branch: master Commit: 1304bf7fb93ffae171e957ab734b7f48b44cddfd URL: https://gitlab.winehq.org/wine/wine/-/commit/1304bf7fb93ffae171e957ab734b7f4...
Author: Eric Pouech epouech@codeweavers.com Date: Wed Mar 6 16:02:21 2024 +0100
evr: Fix YUY2 image copy in evr_copy_sample_buffer().
Signed-off-by: Eric Pouech epouech@codeweavers.com
---
dlls/evr/evr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c index 362c4f1e76f..108f13cdc89 100644 --- a/dlls/evr/evr.c +++ b/dlls/evr/evr.c @@ -388,8 +388,8 @@ static HRESULT evr_copy_sample_buffer(struct evr *filter, const GUID *subtype, I
if (IsEqualGUID(subtype, &MFVideoFormat_YUY2)) { - width = (3 * width + 3) & ~3; - MFCopyImage(locked_rect.pBits, locked_rect.Pitch, src, src_stride, width, lines); + width = (width + 1) & ~1; + MFCopyImage(locked_rect.pBits, locked_rect.Pitch, src, src_stride, width * 2, lines); } else if (IsEqualGUID(subtype, &MFVideoFormat_NV12)) {