vlc | branch: master | Steve Lhomme <[email protected]> | Tue Aug 7 14:18:04 2018 +0200| [c54494b4551bc5d421ab0d33814b6aa65b6ab4bb] | committer: Steve Lhomme
d3d11va: make the OS detection not dependent on the app manifest hopefully the location won't change in future Windows versions > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c54494b4551bc5d421ab0d33814b6aa65b6ab4bb --- modules/codec/avcodec/d3d11va.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c index 6e5fc20f44..9e3a7106ee 100644 --- a/modules/codec/avcodec/d3d11va.c +++ b/modules/codec/avcodec/d3d11va.c @@ -321,9 +321,18 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt, if (pix_fmt != AV_PIX_FMT_D3D11VA_VLD) return VLC_EGENERIC; +#if !VLC_WINSTORE_APP /* Allow using D3D11VA automatically starting from Windows 8.1 */ - if (!va->obj.force && !IsWindows8Point1OrGreater()) - return VLC_EGENERIC; + if (!va->obj.force) + { + bool isWin81OrGreater = false; + HMODULE hKernel32 = GetModuleHandle(TEXT("kernel32.dll")); + if (likely(hKernel32 != NULL)) + isWin81OrGreater = GetProcAddress(hKernel32, "IsProcessCritical") != NULL; + if (!isWin81OrGreater) + return VLC_EGENERIC; + } +#endif vlc_va_sys_t *sys = calloc(1, sizeof (*sys)); if (unlikely(sys == NULL)) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
