From 44857e7a3696bf1a3521be8c0b7354d04af68721 Mon Sep 17 00:00:00 2001 From: Ivan Uskov Date: Thu, 6 Aug 2015 09:30:42 -0400 Subject: [PATCH] libavcodec/qsvdec.c: Extended error messages for MFXVideoDECODE_Init() result Reviewed-by: Hendrik Leppkes Signed-off-by: Michael Niedermayer --- libavcodec/qsvdec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 8fa44b5ca1..e3c076da30 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -110,7 +110,13 @@ int ff_qsv_decode_init(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt) ret = MFXVideoDECODE_Init(q->session, ¶m); if (ret < 0) { - av_log(avctx, AV_LOG_ERROR, "Error initializing the MFX video decoder\n"); + if (MFX_ERR_INVALID_VIDEO_PARAM==ret) { + av_log(avctx, AV_LOG_ERROR, + "Error initializing the MFX video decoder, unsupported video\n"); + } else { + av_log(avctx, AV_LOG_ERROR, + "Error initializing the MFX video decoder %d\n", ret); + } return ff_qsv_error(ret); }