[vlc-commits] d3d11va: detect when the texture size is not correct

Steve Lhomme git at videolan.org
Mon May 28 13:26:04 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Dec 13 17:14:01 2017 +0100| [85009be5428c21cf516a9f229bf20ab26905f67e] | committer: Steve Lhomme

d3d11va: detect when the texture size is not correct

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=85009be5428c21cf516a9f229bf20ab26905f67e
---

 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 04660f4737..4f7e9b899b 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -706,6 +706,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))
     {



More information about the vlc-commits mailing list