On Thu, 2022-02-24 at 10:27 +0800, Tong Wu wrote: > add a return value check for function MFXQueryIMPL to handle the error > message. > > Signed-off-by: Tong Wu <tong1...@intel.com> > --- > libavcodec/qsv.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c > index 1a432dbd82..18f34f05fd 100644 > --- a/libavcodec/qsv.c > +++ b/libavcodec/qsv.c > @@ -408,7 +408,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:
LGTM, applied -Haihao _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".