[vlc-devel] [PATCH 03/14] direct3d11: avoid passing through all the code for nothing in debug builds

Steve Lhomme robux4 at videolabs.io
Mon Mar 20 17:28:22 CET 2017


---
 modules/video_output/win32/direct3d11.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 458e8380cb..b34a1f2dbb 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -480,6 +480,12 @@ static int Open(vlc_object_t *object)
 {
     vout_display_t *vd = (vout_display_t *)object;
 
+#ifndef NDEBUG
+    if ( vd->source.i_chroma == VLC_CODEC_D3D9_OPAQUE ||
+         vd->source.i_chroma == VLC_CODEC_D3D9_OPAQUE_10B )
+        return VLC_EGENERIC;
+#endif
+
 #if !VLC_WINSTORE_APP
     int ret = OpenHwnd(vd);
 #else
-- 
2.11.1



More information about the vlc-devel mailing list