Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Nuo Mi <nuomi2021@gmail.com>
To: Frank Plowman <post@frankplowman.com>
Cc: toqsxw@gmail.com, ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] lavc/vvc: Fix unchecked return code and shadowing
Date: Mon, 2 Jun 2025 21:08:17 +0800
Message-ID: <CAFXK13cxbj81bDvw265sh3zTTCS_=vgC+-3oF-Ha4AmzacibzQ@mail.gmail.com> (raw)
In-Reply-To: <20250531205926.81040-1-post@frankplowman.com>

On Sun, Jun 1, 2025 at 4:59 AM Frank Plowman <post@frankplowman.com> wrote:

> Signed-off-by: Frank Plowman <post@frankplowman.com>
> ---
>  libavcodec/vvc/dec.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c
> index deb1b07b23..ac3f453440 100644
> --- a/libavcodec/vvc/dec.c
> +++ b/libavcodec/vvc/dec.c
> @@ -1160,7 +1160,7 @@ fail:
>  static int frame_end(VVCContext *s, VVCFrameContext *fc)
>  {
>      const AVFilmGrainParams *fgp;
> -    int ret = 0;
> +    int ret;
>
>      if (fc->ref->needs_fg) {
>          av_assert0(fc->ref->frame_grain->buf[0]);
> @@ -1172,9 +1172,13 @@ static int frame_end(VVCContext *s, VVCFrameContext
> *fc)
>          case AV_FILM_GRAIN_PARAMS_H274:
>              ret = ff_h274_apply_film_grain(fc->ref->frame_grain,
> fc->ref->frame,
>                  &s->h274db, fgp);
> +            if (ret < 0)
> +                return ret;
>              break;
>          case AV_FILM_GRAIN_PARAMS_AV1:
>              ret = ff_aom_apply_film_grain(fc->ref->frame_grain,
> fc->ref->frame, fgp);
> +            if (ret < 0)
> +                return ret;
>              break;
>          }
>      }
> @@ -1182,7 +1186,7 @@ static int frame_end(VVCContext *s, VVCFrameContext
> *fc)
>      if (!s->avctx->hwaccel && s->avctx->err_recognition & AV_EF_CRCCHECK)
> {
>          VVCSEI *sei = &fc->sei;
>          if (sei->picture_hash.present) {
> -            int ret = ff_h274_hash_init(&s->hash_ctx,
> sei->picture_hash.hash_type);
> +            ret = ff_h274_hash_init(&s->hash_ctx,
> sei->picture_hash.hash_type);
>              if (ret < 0)
>                  return ret;
>
LGTM.

> --
> 2.47.0
>
>
_______________________________________________
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:[~2025-06-02 13:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-31 20:58 Frank Plowman
2025-06-02 13:08 ` Nuo Mi [this message]
2025-06-07 11:30   ` Nuo Mi

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='CAFXK13cxbj81bDvw265sh3zTTCS_=vgC+-3oF-Ha4AmzacibzQ@mail.gmail.com' \
    --to=nuomi2021@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=post@frankplowman.com \
    --cc=toqsxw@gmail.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