diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c index fb7cc6916c2f58617d2695d3f6a8d2f665cc44cd..1558b2f431f380f203c4d23a77078ab79de5357d 100644 --- a/modules/video_output/win32/direct3d9.c +++ b/modules/video_output/win32/direct3d9.c @@ -1740,6 +1740,16 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg, return VLC_EGENERIC; } + if ( vd->source.i_visible_width > sys->d3d_dev.caps.MaxTextureWidth || + vd->source.i_visible_height > sys->d3d_dev.caps.MaxTextureHeight ) + { + msg_Err(vd, "Textures too large %ux%u max possible: %lx%l", + vd->source.i_visible_width, vd->source.i_visible_height, + sys->d3d_dev.caps.MaxTextureWidth, + sys->d3d_dev.caps.MaxTextureHeight); + goto error; + } + if (sys->setupDeviceCb != LocalSwapchainSetupDevice) CommonPlacePicture(VLC_OBJECT(vd), &sys->area, &sys->sys);