From: Zebediah Figura zfigura@codeweavers.com
--- dlls/quartz/tests/videorenderer.c | 2 ++ dlls/quartz/tests/vmr7.c | 2 ++ dlls/quartz/tests/vmr9.c | 2 ++ dlls/quartz/window.c | 5 ++++- 4 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index fccb32d06d0..29a6d51be7c 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -2807,6 +2807,8 @@ static void test_basic_video(void) ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetVideoSize(video, NULL, &height); ok(hr == E_POINTER, "Got hr %#lx.\n", hr); + hr = IBasicVideo_GetVideoSize(video, &width, &height); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, NULL, &l); ok(hr == E_POINTER, "Got hr %#lx.\n", hr); diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 0e5aa89265a..1f1b99a178c 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -2824,6 +2824,8 @@ static void test_basic_video(void) ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetVideoSize(video, NULL, &height); ok(hr == E_POINTER, "Got hr %#lx.\n", hr); + hr = IBasicVideo_GetVideoSize(video, &width, &height); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, NULL, &l); ok(hr == E_POINTER, "Got hr %#lx.\n", hr); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 1d3fa207e18..d93802485ac 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -3860,6 +3860,8 @@ static void test_basic_video(void) ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetVideoSize(video, NULL, &height); ok(hr == E_POINTER, "Got hr %#lx.\n", hr); + hr = IBasicVideo_GetVideoSize(video, &width, &height); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, NULL, &l); ok(hr == E_POINTER, "Got hr %#lx.\n", hr); diff --git a/dlls/quartz/window.c b/dlls/quartz/window.c index 2064be7e320..1fdbd5f9428 100644 --- a/dlls/quartz/window.c +++ b/dlls/quartz/window.c @@ -1138,13 +1138,16 @@ static HRESULT WINAPI basic_video_SetDefaultDestinationPosition(IBasicVideo *ifa static HRESULT WINAPI basic_video_GetVideoSize(IBasicVideo *iface, LONG *width, LONG *height) { struct video_window *window = impl_from_IBasicVideo(iface); - const BITMAPINFOHEADER *bitmap_header = get_bitmap_header(window); + const BITMAPINFOHEADER *bitmap_header;
TRACE("window %p, width %p, height %p.\n", window, width, height);
if (!width || !height) return E_POINTER; + if (!window->pPin->peer) + return VFW_E_NOT_CONNECTED;
+ bitmap_header = get_bitmap_header(window); *width = bitmap_header->biWidth; *height = bitmap_header->biHeight; return S_OK;