[vlc-devel] [PATCH] directx_va: warn something is wrong with the decoder if no input is available

Steve Lhomme robux4 at videolabs.io
Sat Jan 30 09:26:37 CET 2016


From: Steve Lhomme <robUx4 at gmail.com>

---
 modules/codec/avcodec/directx_va.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index 7f1bad1..53a2558 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -517,6 +517,10 @@ static int FindVideoServiceConversion(vlc_va_t *va, directx_sys_t *dx_sys, const
     int err = dx_sys->pf_get_input_list(va, &p_list);
     if (err != VLC_SUCCESS)
         return err;
+    if (p_list.count == 0) {
+        msg_Warn( va, "No input format found for HWAccel" );
+        return VLC_EGENERIC;
+    }
 
     err = VLC_EGENERIC;
     /* Retreive supported modes from the decoder service */
-- 
2.6.0.windows.1



More information about the vlc-devel mailing list