vlc | branch: master | Steve Lhomme <[email protected]> | Tue Oct 17 14:20:09 
2017 +0200| [fed227ab3b7331df63e16fdebfc82d9e3f3f598d] | committer: 
Jean-Baptiste Kempf

d3d11_fmt: only allow the WARP device type with a software decoder

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fed227ab3b7331df63e16fdebfc82d9e3f3f598d
---

 modules/video_chroma/d3d11_fmt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_chroma/d3d11_fmt.h b/modules/video_chroma/d3d11_fmt.h
index 04ff38ba60..963c54abf0 100644
--- a/modules/video_chroma/d3d11_fmt.h
+++ b/modules/video_chroma/d3d11_fmt.h
@@ -198,7 +198,7 @@ static inline HRESULT D3D11_CreateDevice(vlc_object_t *obj, 
HINSTANCE hdecoder_d
         D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1
     };
 
-    for (UINT driver = 0; driver < ARRAYSIZE(driverAttempts); driver++) {
+    for (UINT driver = 0; driver < (hw_decoding?1:2); driver++) {
         D3D_FEATURE_LEVEL i_feature_level;
         hr = D3D11CreateDevice(NULL, driverAttempts[driver], NULL, 
creationFlags,
                     D3D11_features, ARRAY_SIZE(D3D11_features), 
D3D11_SDK_VERSION,

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to