Commit 45789e00 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz/vmr9: Allow the aspect ratio parameters to be NULL in…

quartz/vmr9: Allow the aspect ratio parameters to be NULL in IVMRWindowlessControl9::GetNativeVideoSize(). Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f44e90d2
......@@ -3808,9 +3808,9 @@ static void test_windowless_size(void)
width = height = 0xdeadbeef;
hr = IVMRWindowlessControl9_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 = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control, &width, &height, &aspect_width, &aspect_height);
......
......@@ -1615,21 +1615,23 @@ static ULONG WINAPI VMR9WindowlessControl_Release(IVMRWindowlessControl9 *iface)
return IUnknown_Release(This->renderer.filter.outer_unk);
}
static HRESULT WINAPI VMR9WindowlessControl_GetNativeVideoSize(IVMRWindowlessControl9 *iface, LONG *width, LONG *height, LONG *arwidth, LONG *arheight)
static HRESULT WINAPI VMR9WindowlessControl_GetNativeVideoSize(IVMRWindowlessControl9 *iface,
LONG *width, LONG *height, LONG *aspect_width, LONG *aspect_height)
{
struct quartz_vmr *This = impl_from_IVMRWindowlessControl9(iface);
TRACE("(%p/%p)->(%p, %p, %p, %p)\n", iface, This, width, height, arwidth, arheight);
struct quartz_vmr *filter = impl_from_IVMRWindowlessControl9(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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment