[vlc-commits] direct3d9: do not try to use the vout if the texture requested is too large
Steve Lhomme
git at videolan.org
Fri May 27 10:15:33 CEST 2016
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri May 27 09:18:00 2016 +0200| [bf2b768ece45a415f5ac834036fd2bd6d30dbc19] | committer: Jean-Baptiste Kempf
direct3d9: do not try to use the vout if the texture requested is too large
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bf2b768ece45a415f5ac834036fd2bd6d30dbc19
---
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;
}
More information about the vlc-commits
mailing list