[vlc-devel] [PATCH] d3d11va: fix Xbox limitation test

Steve Lhomme robux4 at videolabs.io
Fri Jul 28 13:37:33 CEST 2017


The va_pool surface dimensions are only set if the surfaces are created
successfully. We must use the temporary video_format_t dimensions at this stage.
---
 modules/codec/avcodec/d3d11va.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 0cc153c5d1..abcaca5acb 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -743,10 +743,10 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
     /* On the Xbox 1/S, any decoding of H264 with one dimension over 2304
      * crashes totally the device */
     if (codec_id == AV_CODEC_ID_H264 &&
-        (dx_sys->va_pool.surface_width > 2304 || dx_sys->va_pool.surface_height > 2304) &&
+        (fmt->i_width > 2304 || fmt->i_height > 2304) &&
         isXboxHardware(dx_sys->d3ddev))
     {
-        msg_Warn(va, "%dx%d resolution not supported by your hardware", dx_sys->va_pool.surface_width, dx_sys->va_pool.surface_height);
+        msg_Warn(va, "%dx%d resolution not supported by your hardware", fmt->i_width, fmt->i_height);
         return VLC_EGENERIC;
     }
 #endif
-- 
2.12.1



More information about the vlc-devel mailing list