[vlc-devel] [PATCH] avcodec: log why the va is refused on chroma mismatches

Steve Lhomme robux4 at videolabs.io
Wed Aug 10 16:18:33 CEST 2016


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

diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
index 8a6b549..34de0a9 100644
--- a/modules/codec/avcodec/va.c
+++ b/modules/codec/avcodec/va.c
@@ -128,9 +128,12 @@ vlc_va_t *vlc_va_New(vlc_object_t *obj, AVCodecContext *avctx,
     }
 
     vlc_fourcc_t chroma;
+    vlc_fourcc_t expected = vlc_va_GetChroma( pix_fmt, avctx->sw_pix_fmt );
     va->setup(va, &chroma);
-    if (chroma != vlc_va_GetChroma(pix_fmt, avctx->sw_pix_fmt))
+    if (chroma != expected)
     {   /* Mismatch, cannot work, fail */
+        msg_Dbg( obj, "chroma mismatch %4.4s expected %4.4s", 
+                 (const char*)&chroma, (const char*) &expected );
         vlc_va_Delete(va, avctx);
 #endif
         va = NULL;
-- 
2.8.2



More information about the vlc-devel mailing list