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: "linjie.fu@intel.com" <linjie.fu@intel.com>
Subject: Re: [FFmpeg-devel] [PATCH] lavc/qsvenc: add return check for	ff_qsv_map_pixfmt
Date: Mon, 10 Jan 2022 07:07:48 +0000
Message-ID: <894a6c6b8f534ee7ce671a98ed933b43897dcc49.camel@intel.com> (raw)
In-Reply-To: <CH0PR11MB55079D04AEB839906DD29F079E4D9@CH0PR11MB5507.namprd11.prod.outlook.com>

On Fri, 2022-01-07 at 07:55 +0000, Xiang, Haihao wrote:
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Linjie
> > Fu
> > Sent: Tuesday, February 25, 2020 10:03
> > To: ffmpeg-devel@ffmpeg.org
> > Cc: Fu, Linjie <linjie.fu@intel.com>
> > Subject: [FFmpeg-devel] [PATCH] lavc/qsvenc: add return check for
> > ff_qsv_map_pixfmt
> > 
> > Return an error directly if pixfmt is not supported for encoding, otherwise
> > it may be hidden until query/check in MSDK.
> > 
> > Signed-off-by: Linjie Fu <linjie.fu@intel.com>
> > ---
> >  libavcodec/qsvenc.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> > index 571a711..40ff17c 100644
> > --- a/libavcodec/qsvenc.c
> > +++ b/libavcodec/qsvenc.c
> > @@ -436,7 +436,9 @@ static int init_video_param_jpeg(AVCodecContext
> > *avctx, QSVEncContext *q)
> >      if (!desc)
> >          return AVERROR_BUG;
> > 
> > -    ff_qsv_map_pixfmt(sw_format, &q->param.mfx.FrameInfo.FourCC);
> > +    ret = ff_qsv_map_pixfmt(sw_format, &q->param.mfx.FrameInfo.FourCC);
> > +    if (ret < 0)
> > +        return AVERROR_BUG;
> > 
> >      q->param.mfx.FrameInfo.CropX          = 0;
> >      q->param.mfx.FrameInfo.CropY          = 0;
> > @@ -537,7 +539,9 @@ static int init_video_param(AVCodecContext *avctx,
> > QSVEncContext *q)
> >      if (!desc)
> >          return AVERROR_BUG;
> > 
> > -    ff_qsv_map_pixfmt(sw_format, &q->param.mfx.FrameInfo.FourCC);
> > +    ret = ff_qsv_map_pixfmt(sw_format, &q->param.mfx.FrameInfo.FourCC);
> > +    if (ret < 0)
> > +        return AVERROR_BUG;
> > 
> >      q->param.mfx.FrameInfo.CropX          = 0;
> >      q->param.mfx.FrameInfo.CropY          = 0;
> > --
> > 2.7.4
> 
> LGTM, and I will apply it if no objection.
> 
Applied, thx!

-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".

      reply	other threads:[~2022-01-10  7:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1582596153-1442-1-git-send-email-linjie.fu@intel.com>
2022-01-07  7:55 ` Xiang, Haihao
2022-01-10  7:07   ` 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=894a6c6b8f534ee7ce671a98ed933b43897dcc49.camel@intel.com \
    --to=haihao.xiang-at-intel.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=linjie.fu@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