aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorTong Wu <tong1.wu-at-intel.com@ffmpeg.org>2022-02-24 10:27:39 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2022-02-28 12:41:27 +0800
commitd05ca3d779aed2df3d1cd74d1d295eb3729b7bf2 (patch)
tree06945a419b363fd35f93ce900c8421e65bb0a02d /libavcodec
parent342d4fb0563cafa4e444c83dc4ecfa0d69a71eda (diff)
downloadffmpeg-d05ca3d779aed2df3d1cd74d1d295eb3729b7bf2.tar.gz
qsv: add return value check for MFXQueryIMPL
add a return value check for function MFXQueryIMPL to handle the error message. Signed-off-by: Tong Wu <tong1.wu@intel.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/qsv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index b75877e698..67d0e3934a 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -424,7 +424,10 @@ int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs,
return ret;
}
- MFXQueryIMPL(qs->session, &impl);
+ ret = MFXQueryIMPL(qs->session, &impl);
+ if (ret != MFX_ERR_NONE)
+ return ff_qsv_print_error(avctx, ret,
+ "Error querying the session attributes");
switch (MFX_IMPL_BASETYPE(impl)) {
case MFX_IMPL_SOFTWARE: