[vlc-commits] d3d11va: fix Xbox limitation test

Steve Lhomme git at videolan.org
Fri Aug 4 10:16:31 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Jul 28 13:37:33 2017 +0200| [b2ad163c9f3b71127c337f66d8033afc3494203e] | committer: Jean-Baptiste Kempf

d3d11va: fix Xbox limitation test

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.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 0a874e48e6..c026f8b9b5 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -740,10 +740,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



More information about the vlc-commits mailing list