aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qsvdec.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-03-12 15:19:05 +0000
committerMark Thompson <sw@jkqxz.net>2017-03-12 15:19:05 +0000
commit15887a410c5ae271c59e5bc6d60ae443e6c40ac7 (patch)
treecddbd09e9d7c18e9b87e9302a53e9bbe9cf3ca00 /libavcodec/qsvdec.c
parent723a542d6c67de2946dbb7f782393c8c2bee8e0b (diff)
parent95414eb2dc63a6f934275b4ed33dedd4369f2c49 (diff)
downloadffmpeg-15887a410c5ae271c59e5bc6d60ae443e6c40ac7.tar.gz
Merge commit '95414eb2dc63a6f934275b4ed33dedd4369f2c49'
* commit '95414eb2dc63a6f934275b4ed33dedd4369f2c49': qsv: print more complete error messages Merged-by: Mark Thompson <sw@jkqxz.net>
Diffstat (limited to 'libavcodec/qsvdec.c')
-rw-r--r--libavcodec/qsvdec.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 258042d0e7..06056a3061 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -176,16 +176,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) {
- 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);
- }
+ if (ret < 0)
+ return ff_qsv_print_error(avctx, ret,
+ "Error initializing the MFX video decoder");
q->frame_info = param.mfx.FrameInfo;
@@ -321,9 +314,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