[PATCH 0/1] MR2955: winegstreamer: Fix check for non-zero padding in mf_media_type_from_wg_format_video().
Similar to 35f9091, IsRectEmpty() is the wrong way to check if padding is empty. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2955
From: Zhiyi Zhang <zzhang(a)codeweavers.com> Similar to 35f9091, IsRectEmpty() is the wrong way to check if padding is empty. --- dlls/winegstreamer/mfplat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c index 9cf98ec9dc4..e740807101e 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -531,7 +531,8 @@ static IMFMediaType *mf_media_type_from_wg_format_video(const struct wg_format * stride = -stride; IMFMediaType_SetUINT32(type, &MF_MT_DEFAULT_STRIDE, stride); - if (!IsRectEmpty(&format->u.video.padding)) + if (format->u.video.padding.left || format->u.video.padding.right + || format->u.video.padding.top || format->u.video.padding.bottom) { MFVideoArea aperture = { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2955
This merge request was approved by Zebediah Figura. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2955
I'm not familiar enough with the mfplat test infrastructure to know, but is this something we can easily add tests for? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/2955#note_34483
participants (3)
-
Zebediah Figura (@zfigura) -
Zhiyi Zhang -
Zhiyi Zhang (@zhiyi)