Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2017-08-19 13:05:57 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2017-08-19 13:05:57 +0300
commitf781bc579188c0fd53007375879097ae5137362f (patch)
tree9e4d67c764a0f1402b66fe689072f82d013b9b61
parentbd3b16bd2e607ed2eb669230ef2dde32092c4226 (diff)
d3d11: check for Windows 8 or newer during init
This avoids failing later and possibly getting stuck in native mode.
-rw-r--r--decoder/LAVVideo/decoders/d3d11va.cpp4
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)
{