Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Cc: "Wu, Tong1" <tong1.wu@intel.com>
Subject: Re: [FFmpeg-devel] [PATCH] qsv: add return value check for MFXQueryIMPL
Date: Mon, 28 Feb 2022 06:39:25 +0000
Message-ID: <d4200724c5d74ca4b8fe112a8645c6c0a9bb5c0a.camel@intel.com> (raw)
In-Reply-To: <20220224022740.58216-1-tong1.wu@intel.com>

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.wu@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-request@ffmpeg.org with subject "unsubscribe".

      parent reply	other threads:[~2022-02-28  6:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  2:27 Tong Wu
2022-02-24  2:27 ` [FFmpeg-devel] [PATCH] qsvenc: avoid dereferencing the null pointer Tong Wu
2022-02-28  6:39   ` Xiang, Haihao
2022-02-28  6:39 ` Xiang, Haihao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4200724c5d74ca4b8fe112a8645c6c0a9bb5c0a.camel@intel.com \
    --to=haihao.xiang-at-intel.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=tong1.wu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git