From: Frank Plowman <post@frankplowman.com> To: ffmpeg-devel@ffmpeg.org Cc: Frank Plowman <post@frankplowman.com>, nuomi2021@gmail.com, toqsxw@gmail.com Subject: [FFmpeg-devel] [PATCH] lavc/vvc: Fix unchecked return code and shadowing Date: Sat, 31 May 2025 21:58:53 +0100 Message-ID: <20250531205926.81040-1-post@frankplowman.com> (raw) 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; -- 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".
next reply other threads:[~2025-05-31 20:59 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-05-31 20:58 Frank Plowman [this message] 2025-06-02 13:08 ` Nuo Mi 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=20250531205926.81040-1-post@frankplowman.com \ --to=post@frankplowman.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=nuomi2021@gmail.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