quartz/vmr9: Return E_INVALIDARG if both texture and offscreen flags are passed to AllocateSurfaceHelper().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a599d645e3
commit
7f0347bb04
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue