Module: wine Branch: master Commit: 46a6dd0824091ac060b81f346ac7cf0944738c8b URL: https://source.winehq.org/git/wine.git/?a=commit;h=46a6dd0824091ac060b81f346...
Author: Zebediah Figura z.figura12@gmail.com Date: Fri Jun 19 19:50:14 2020 -0500
quartz/vmr9: The source pitch is the width of the Y plane for planar 4:2:0 formats.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/quartz/vmr9.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 5c2cf33820..bee5a10718 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -261,7 +261,11 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi width = bitmap_header->biWidth; height = bitmap_header->biHeight; depth = bitmap_header->biBitCount; - src_pitch = ((width * depth / 8) + 3) & ~3; + if (bitmap_header->biCompression == mmioFOURCC('N','V','1','2') + || bitmap_header->biCompression == mmioFOURCC('Y','V','1','2')) + src_pitch = width; + else /* packed YUV (UYVY or YUY2) or RGB */ + src_pitch = ((width * depth / 8) + 3) & ~3;
info.rtStart = start_time; info.rtEnd = end_time;