[vlc-devel] [PATCH 6/6] d3d11va: detect when the texture alignment is not correct
Steve Lhomme
robux4 at videolabs.io
Wed Dec 13 17:17:23 CET 2017
---
modules/codec/avcodec/d3d11va.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 0fb16efb8e..dde9c22cc8 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -686,6 +686,9 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
sys->textureHeight = fmt->i_height;
}
+ assert(sys->textureWidth >= fmt->i_width);
+ assert(sys->textureHeight >= fmt->i_height);
+
if ((sys->textureWidth != fmt->i_width || sys->textureHeight != fmt->i_height) &&
!CanUseDecoderPadding(sys))
{
--
2.14.2
More information about the vlc-devel
mailing list