[vlc-devel] [PATCH 1/2] direct3d9: do not try to use the vout if the texture requested is too large

Steve Lhomme robux4 at videolabs.io
Fri May 27 09:18:00 CEST 2016


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

diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index f9e68a8..784612d 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -648,6 +648,16 @@ static int Direct3D9Create(vout_display_t *vd)
         return VLC_EGENERIC;
     }
 
+    if ( vd->fmt.i_width > sys->d3dcaps.MaxTextureWidth ||
+         vd->fmt.i_height > sys->d3dcaps.MaxTextureHeight )
+    {
+        msg_Err(vd, "Textures too large %ux%u max possible: %ux%u",
+                vd->fmt.i_width, vd->fmt.i_height,
+                (unsigned) sys->d3dcaps.MaxTextureWidth,
+                (unsigned) sys->d3dcaps.MaxTextureHeight);
+        return VLC_EGENERIC;
+    }
+
     return VLC_SUCCESS;
 }
 
-- 
2.8.1



More information about the vlc-devel mailing list