Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] lavc/vvc: Fix unchecked return code and shadowing
@ 2025-05-31 20:58 Frank Plowman
  2025-06-02 13:08 ` Nuo Mi
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Plowman @ 2025-05-31 20:58 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Frank Plowman, nuomi2021, toqsxw

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-07 11:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-31 20:58 [FFmpeg-devel] [PATCH] lavc/vvc: Fix unchecked return code and shadowing Frank Plowman
2025-06-02 13:08 ` Nuo Mi
2025-06-07 11:30   ` Nuo Mi

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