diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-19 13:05:57 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-08-19 13:05:57 +0300 |
commit | f781bc579188c0fd53007375879097ae5137362f (patch) | |
tree | 9e4d67c764a0f1402b66fe689072f82d013b9b61 /decoder/LAVVideo | |
parent | bd3b16bd2e607ed2eb669230ef2dde32092c4226 (diff) |
d3d11: check for Windows 8 or newer during init
This avoids failing later and possibly getting stuck in native mode.
Diffstat (limited to 'decoder/LAVVideo')
-rw-r--r-- | decoder/LAVVideo/decoders/d3d11va.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/decoder/LAVVideo/decoders/d3d11va.cpp b/decoder/LAVVideo/decoders/d3d11va.cpp index 3107deab..683bc8f8 100644 --- a/decoder/LAVVideo/decoders/d3d11va.cpp +++ b/decoder/LAVVideo/decoders/d3d11va.cpp @@ -104,6 +104,10 @@ STDMETHODIMP CDecD3D11::DestroyDecoder(bool bFull, bool bNoAVCodec) // ILAVDecoder STDMETHODIMP CDecD3D11::Init() { + // D3D11 decoding requires Windows 8 or newer + if (!IsWindows8OrNewer()) + return E_NOINTERFACE; + dx.d3d11lib = LoadLibrary(L"d3d11.dll"); if (dx.d3d11lib == nullptr) { |