summaryrefslogtreecommitdiff
path: root/libavcodec/qsvdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-06-25 21:38:10 +0200
committerAnton Khirnov <anton@khirnov.net>2016-07-22 19:08:13 +0200
commit95414eb2dc63a6f934275b4ed33dedd4369f2c49 (patch)
treea806cfb1653f298861f6467f0081e38885f32b43 /libavcodec/qsvdec.c
parentd9ec3c60143babe1bb77c268e1d5547d15acd69b (diff)
qsv: print more complete error messages
Include the libmfx error code and its description
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r--libavcodec/qsvdec.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 5b36489677..4802932ea7 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -161,10 +161,9 @@ static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q)
param.NumExtParam = q->nb_ext_buffers;
ret = MFXVideoDECODE_Init(q->session, &param);
- if (ret < 0) {
- av_log(avctx, AV_LOG_ERROR, "Error initializing the MFX video decoder\n");
- return ff_qsv_error(ret);
- }
+ if (ret < 0)
+ return ff_qsv_print_error(avctx, ret,
+ "Error initializing the MFX video decoder");
q->frame_info = param.mfx.FrameInfo;
@@ -298,9 +297,9 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
ret != MFX_ERR_MORE_DATA &&
ret != MFX_WRN_VIDEO_PARAM_CHANGED &&
ret != MFX_ERR_MORE_SURFACE) {
- av_log(avctx, AV_LOG_ERROR, "Error during QSV decoding.\n");
av_freep(&sync);
- return ff_qsv_error(ret);
+ return ff_qsv_print_error(avctx, ret,
+ "Error during QSV decoding.");
}
/* make sure we do not enter an infinite loop if the SDK