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>
release/5.1
Tong Wu 3 years ago committed by Haihao Xiang
parent 342d4fb056
commit d05ca3d779
  1. 5
      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:

Loading…
Cancel
Save