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] qsvenc: avoid dereferencing the null pointer
Date: Mon, 28 Feb 2022 06:39:52 +0000
Message-ID: <25081afdf63b9578e32e4ad022487d66e4c724b1.camel@intel.com> (raw)
In-Reply-To: <20220224022740.58216-2-tong1.wu@intel.com>
On Thu, 2022-02-24 at 10:27 +0800, Tong Wu wrote:
> The variable AVFrame *frame could be a null pointer, now add a null
> pointer check to avoid dereferencing the null pointer.
>
> Signed-off-by: Tong Wu <tong1.wu@intel.com>
> ---
> libavcodec/qsvenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 07be4287b7..998e43753e 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -1726,7 +1726,7 @@ static int encode_frame(AVCodecContext *avctx,
> QSVEncContext *q,
> goto free;
> }
>
> - if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame->interlaced_frame)
> + if (ret == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM && frame && frame-
> >interlaced_frame)
> print_interlace_msg(avctx, q);
>
> ret = 0;
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".
next prev parent reply other threads:[~2022-02-28 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 2:27 [FFmpeg-devel] [PATCH] qsv: add return value check for MFXQueryIMPL 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 [this message]
2022-02-28 6:39 ` [FFmpeg-devel] [PATCH] qsv: add return value check for MFXQueryIMPL Xiang, Haihao
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=25081afdf63b9578e32e4ad022487d66e4c724b1.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