Nikolay Sivov : dxva2: Check input stream format in GetVideoProcessorDeviceGuids().
Alexandre Julliard
julliard at winehq.org
Mon Jun 7 16:30:36 CDT 2021
Module: wine
Branch: master
Commit: b7c48c898cf732f8f22d288c535323cbc8aa1b82
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b7c48c898cf732f8f22d288c535323cbc8aa1b82
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Jun 7 19:34:16 2021 +0300
dxva2: Check input stream format in GetVideoProcessorDeviceGuids().
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dxva2/main.c | 5 +++++
dlls/dxva2/tests/dxva2.c | 1 -
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
index 4eefffd6052..f91b033055c 100644
--- a/dlls/dxva2/main.c
+++ b/dlls/dxva2/main.c
@@ -390,6 +390,11 @@ static HRESULT WINAPI device_manager_processor_service_GetVideoProcessorDeviceGu
{
FIXME("%p, %p, %p, %p semi-stub.\n", iface, video_desc, count, guids);
+ *count = 0;
+
+ if (!dxva_is_supported_stream_format(video_desc))
+ return E_FAIL;
+
if (!(*guids = CoTaskMemAlloc(sizeof(**guids))))
return E_OUTOFMEMORY;
diff --git a/dlls/dxva2/tests/dxva2.c b/dlls/dxva2/tests/dxva2.c
index f785b2ce147..80749b81f12 100644
--- a/dlls/dxva2/tests/dxva2.c
+++ b/dlls/dxva2/tests/dxva2.c
@@ -380,7 +380,6 @@ static void test_device_manager(void)
ok(hr == E_FAIL, "Unexpected hr %#x, format %d.\n", hr, rt_unsupported_formats[i]);
hr = IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids(proc_service, &video_desc, &count, &guids);
- todo_wine
ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr);
}
More information about the wine-cvs
mailing list