mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 10:14:13 -05:00
obs-ffmpeg: Remove EnumOutputs from encoder tests
This call will fail on multi-adapter systems, and isn't used anyway, so just remove it. Not sure why it was called in the first place; pretty sure it was unintended and was likely just copied over from the D3D11 subsystem code.
This commit is contained in:
@@ -59,11 +59,6 @@ static bool get_adapter_caps(IDXGIFactory *factory, uint32_t adapter_idx)
|
||||
|
||||
caps.is_amd = true;
|
||||
|
||||
ComPtr<IDXGIOutput> output;
|
||||
hr = adapter->EnumOutputs(0, &output);
|
||||
if (FAILED(hr))
|
||||
return true;
|
||||
|
||||
ComPtr<ID3D11Device> device;
|
||||
ComPtr<ID3D11DeviceContext> context;
|
||||
hr = D3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, 0,
|
||||
|
||||
@@ -41,7 +41,6 @@ static bool get_adapter_caps(IDXGIFactory *factory, uint32_t adapter_idx)
|
||||
{
|
||||
struct nvenc_info *caps = &adapter_info[adapter_idx];
|
||||
IDXGIAdapter *adapter = NULL;
|
||||
IDXGIOutput *output = NULL;
|
||||
ID3D11Device *device = NULL;
|
||||
ID3D11DeviceContext *context = NULL;
|
||||
GUID *guids = NULL;
|
||||
@@ -63,10 +62,6 @@ static bool get_adapter_caps(IDXGIFactory *factory, uint32_t adapter_idx)
|
||||
|
||||
caps->is_nvidia = true;
|
||||
|
||||
hr = adapter->lpVtbl->EnumOutputs(adapter, 0, &output);
|
||||
if (FAILED(hr))
|
||||
goto finish;
|
||||
|
||||
hr = D3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, 0, NULL,
|
||||
0, D3D11_SDK_VERSION, &device, NULL, &context);
|
||||
if (FAILED(hr))
|
||||
@@ -111,8 +106,6 @@ finish:
|
||||
context->lpVtbl->Release(context);
|
||||
if (device)
|
||||
device->lpVtbl->Release(device);
|
||||
if (output)
|
||||
output->lpVtbl->Release(output);
|
||||
if (adapter)
|
||||
adapter->lpVtbl->Release(adapter);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user