[vlc-commits] d3d11va: it's unlikely that we'll use the vout pool but don't have enough slices

Steve Lhomme git at videolan.org
Tue Feb 20 10:03:33 CET 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Feb 20 08:50:35 2018 +0100| [d454d165a3bcbda1d832669e1a0293c2d200c86f] | committer: Hugo Beauzée-Luyssen

d3d11va: it's unlikely that we'll use the vout pool but don't have enough slices

(cherry picked from commit 0b320e5ec137b7afb50d6c91cb6873859f066ff5)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 modules/codec/avcodec/d3d11va.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index bcac511956..d14e2d2284 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -764,7 +764,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
 
             D3D11_TEXTURE2D_DESC texDesc;
             ID3D11Texture2D_GetDesc(pic->p_sys->texture[KNOWN_DXGI_INDEX], &texDesc);
-            if (texDesc.ArraySize < surface_count)
+            if (unlikely(texDesc.ArraySize < surface_count))
             {
                 msg_Warn(va, "not enough decoding slices in the texture (%d/%d)",
                          texDesc.ArraySize, surface_count);



More information about the vlc-commits mailing list