@@ -408,13 +408,13 @@ const char* detectD3d11va(FFCodecOptions* options, FFlist* result /*list of FFCo
408408 FF_LIBRARY_LOAD_SYMBOL_MESSAGE (d3d11, D3D11CreateDevice)
409409 FF_LIBRARY_LOAD_MESSAGE (mfplat, " mfplat" FF_LIBRARY_EXTENSION , 1 )
410410 FF_LIBRARY_LOAD_SYMBOL_MESSAGE (mfplat, MFCreateAttributes)
411- FF_LIBRARY_LOAD_SYMBOL_MESSAGE (mfplat, MFTEnum2)
411+ FF_LIBRARY_LOAD_SYMBOL_LAZY (mfplat, MFTEnum2) // Not available on Windows 8.1
412412
413413 ffEnumHardwareAdapters (factory, [&](IDXGIAdapter1* adapter, const DXGI_ADAPTER_DESC1 & desc) {
414414 FFCodecType decoders = (options->showType & FF_CODEC_SHOW_TYPE_DECODER )
415415 ? ffDetectD3d11vaDecoders (adapter, ffD3D11CreateDevice)
416416 : FF_CODEC_TYPE_NONE ;
417- FFCodecType encoders = (options->showType & FF_CODEC_SHOW_TYPE_ENCODER )
417+ FFCodecType encoders = ffMFTEnum2 && (options->showType & FF_CODEC_SHOW_TYPE_ENCODER )
418418 ? ffDetectD3d11MftEncoders (desc.AdapterLuid , ffMFCreateAttributes, ffMFTEnum2)
419419 : FF_CODEC_TYPE_NONE ;
420420
@@ -426,7 +426,7 @@ const char* detectD3d11va(FFCodecOptions* options, FFlist* result /*list of FFCo
426426 ffStrbufInitWS (&gpuResult->gpu , desc.Description );
427427 gpuResult->decoders = decoders;
428428 gpuResult->encoders = encoders;
429- gpuResult->platformApi = " D3D11VA+MFT" ;
429+ gpuResult->platformApi = ffMFTEnum2 ? " D3D11VA+MFT" : " D3D11VA " ;
430430 });
431431
432432 return nullptr ;
0 commit comments