Commit 7eaac918 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Check whether the pin is connected in IBasicVideo::GetVideoSize().

parent bf45b87a
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
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