Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/vmr9.c | 7 +++++++ dlls/quartz/vmr9.c | 7 +++++++ 2 files changed, 14 insertions(+)
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index a2fd5b76861..092ee871328 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -2760,6 +2760,13 @@ static void test_allocate_surface_helper(void)
IDirect3DSurface9_Release(surfaces[0]);
+ info.Format = D3DFMT_A8R8G8B8; + info.dwFlags = VMR9AllocFlag_OffscreenSurface | VMR9AllocFlag_TextureSurface; + count = 1; + hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, surfaces); + ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(count == 1, "Got count %u.\n", count); + out: IVMRSurfaceAllocatorNotify9_Release(notify); ref = IBaseFilter_Release(filter); diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 00cd6bbce84..f66500086d5 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2042,6 +2042,13 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(IVMRSurfa allocinfo->dwFlags, allocinfo->dwWidth, allocinfo->dwHeight, allocinfo->Format, allocinfo->Format, allocinfo->Pool, allocinfo->MinBuffers);
+ if ((allocinfo->dwFlags & VMR9AllocFlag_TextureSurface) + && (allocinfo->dwFlags & VMR9AllocFlag_OffscreenSurface)) + { + WARN("Invalid flags specified; returning E_INVALIDARG.\n"); + return E_INVALIDARG; + } + if (!allocinfo->Format) { IDirect3DSurface9 *backbuffer;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/vfwcapture.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 7d82a01109c..910be107b0b 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -124,7 +124,7 @@ static HRESULT vfw_capture_init_stream(struct strmbase_filter *iface) VfwCapture *filter = impl_from_strmbase_filter(iface);
filter->device->ops->init_stream(filter->device); - return VFW_S_CANT_CUE; + return S_OK; }
static HRESULT vfw_capture_start_stream(struct strmbase_filter *iface, REFERENCE_TIME time) @@ -140,7 +140,7 @@ static HRESULT vfw_capture_stop_stream(struct strmbase_filter *iface) VfwCapture *filter = impl_from_strmbase_filter(iface);
filter->device->ops->stop_stream(filter->device); - return VFW_S_CANT_CUE; + return S_OK; }
static HRESULT vfw_capture_cleanup_stream(struct strmbase_filter *iface) @@ -151,6 +151,11 @@ static HRESULT vfw_capture_cleanup_stream(struct strmbase_filter *iface) return S_OK; }
+static HRESULT vfw_capture_wait_state(struct strmbase_filter *iface, DWORD timeout) +{ + return iface->state == State_Paused ? VFW_S_CANT_CUE : S_OK; +} + static const struct strmbase_filter_ops filter_ops = { .filter_get_pin = vfw_capture_get_pin, @@ -160,6 +165,7 @@ static const struct strmbase_filter_ops filter_ops = .filter_start_stream = vfw_capture_start_stream, .filter_stop_stream = vfw_capture_stop_stream, .filter_cleanup_stream = vfw_capture_cleanup_stream, + .filter_wait_state = vfw_capture_wait_state, };
static HRESULT WINAPI AMStreamConfig_QueryInterface(IAMStreamConfig *iface, REFIID iid, void **out)