Module: wine Branch: master Commit: c387df07397ce9060d8a191fda6489f5ddfe6ea8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=c387df07397ce9060d8a191fd...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Fri Dec 4 21:13:59 2020 +0900
quartz/vmr9: Allow the aspect ratio parameters to be NULL in IVMRWindowlessControl::GetNativeVideoSize().
Please refer to the commit 45789e00dad69a2609b6a104b71731fe483428b0 which fixes IVMRWindowlessControl9::GetNativeVideoSize().
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/quartz/tests/vmr7.c | 6 +++--- dlls/quartz/vmr9.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 676bc56712d..ba2a98cb69d 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -2858,9 +2858,9 @@ static void test_windowless_size(void)
width = height = 0xdeadbeef; hr = IVMRWindowlessControl_GetNativeVideoSize(windowless_control, &width, &height, NULL, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(width == 32, "Got width %d.\n", width); - todo_wine ok(height == 16, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(width == 32, "Got width %d.\n", width); + ok(height == 16, "Got height %d.\n", height);
aspect_width = aspect_height = 0xdeadbeef; hr = IVMRWindowlessControl_GetNativeVideoSize(windowless_control, &width, &height, &aspect_width, &aspect_height); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 3ddef8dbed5..a664d5109c3 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -1462,22 +1462,22 @@ static ULONG WINAPI VMR7WindowlessControl_Release(IVMRWindowlessControl *iface) }
static HRESULT WINAPI VMR7WindowlessControl_GetNativeVideoSize(IVMRWindowlessControl *iface, - LONG *width, LONG *height, - LONG *arwidth, LONG *arheight) + LONG *width, LONG *height, LONG *aspect_width, LONG *aspect_height) { - struct quartz_vmr *This = impl_from_IVMRWindowlessControl(iface); - TRACE("(%p/%p)->(%p, %p, %p, %p)\n", iface, This, width, height, arwidth, arheight); + struct quartz_vmr *filter = impl_from_IVMRWindowlessControl(iface);
- if (!width || !height || !arwidth || !arheight) - { - ERR("Got no pointer\n"); + TRACE("filter %p, width %p, height %p, aspect_width %p, aspect_height %p.\n", + filter, width, height, aspect_width, aspect_height); + + if (!width || !height) return E_POINTER; - }
- *width = This->bmiheader.biWidth; - *height = This->bmiheader.biHeight; - *arwidth = This->bmiheader.biWidth; - *arheight = This->bmiheader.biHeight; + *width = filter->bmiheader.biWidth; + *height = filter->bmiheader.biHeight; + if (aspect_width) + *aspect_width = filter->bmiheader.biWidth; + if (aspect_height) + *aspect_height = filter->bmiheader.biHeight;
return S_OK; }