[vlc-commits] d3d11va: don't go further if we don't know the format to decode to

Steve Lhomme git at videolan.org
Wed Jun 14 16:36:34 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Wed Jun 14 15:48:48 2017 +0200| [c7992598c756f64dda9a6d55675318687215acec] | committer: Hugo Beauzée-Luyssen

d3d11va: don't go further if we don't know the format to decode to

CID #1444698

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 modules/codec/avcodec/d3d11va.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index d2c6b52be9..a1ae988e67 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -784,6 +784,11 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id, const video_forma
             break;
         }
     }
+    if (unlikely(textureFmt==NULL))
+    {
+        msg_Dbg(va, "no hardware decoder matching %s", DxgiFormatToStr(sys->render));
+        return VLC_EGENERIC;
+    }
 
     if (sys->b_extern_pool)
     {



More information about the vlc-commits mailing list