Skip to content

Commit

Permalink
avutil/hwcontext_d3d11va: prefer DXGI 1.1 factory when available
Browse files Browse the repository at this point in the history
  • Loading branch information
BtbN committed Mar 13, 2024
1 parent 4700925 commit 30f03c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libavutil/hwcontext_d3d11va.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ static av_cold void load_functions(void)
return;

mD3D11CreateDevice = (PFN_D3D11_CREATE_DEVICE) GetProcAddress(d3dlib, "D3D11CreateDevice");
mCreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY) GetProcAddress(dxgilib, "CreateDXGIFactory");
mCreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY) GetProcAddress(dxgilib, "CreateDXGIFactory1");
if (!mCreateDXGIFactory)
mCreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY) GetProcAddress(dxgilib, "CreateDXGIFactory");
#else
// In UWP (which lacks LoadLibrary), CreateDXGIFactory isn't available,
// only CreateDXGIFactory1
Expand Down

0 comments on commit 30f03c4

Please sign in to comment.