1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

lavc/vvc: Fix unchecked return code and shadowing

Signed-off-by: Frank Plowman <post@frankplowman.com>
This commit is contained in:
Frank Plowman
2025-05-31 21:58:53 +01:00
committed by Nuo Mi
parent 1998879868
commit 81370fd796

View File

@@ -1077,7 +1077,7 @@ fail:
static int frame_end(VVCContext *s, VVCFrameContext *fc) static int frame_end(VVCContext *s, VVCFrameContext *fc)
{ {
const AVFilmGrainParams *fgp; const AVFilmGrainParams *fgp;
int ret = 0; int ret;
if (fc->ref->needs_fg) { if (fc->ref->needs_fg) {
av_assert0(fc->ref->frame_grain->buf[0]); av_assert0(fc->ref->frame_grain->buf[0]);
@@ -1089,9 +1089,13 @@ static int frame_end(VVCContext *s, VVCFrameContext *fc)
case AV_FILM_GRAIN_PARAMS_H274: case AV_FILM_GRAIN_PARAMS_H274:
ret = ff_h274_apply_film_grain(fc->ref->frame_grain, fc->ref->frame, ret = ff_h274_apply_film_grain(fc->ref->frame_grain, fc->ref->frame,
&s->h274db, fgp); &s->h274db, fgp);
if (ret < 0)
return ret;
break; break;
case AV_FILM_GRAIN_PARAMS_AV1: case AV_FILM_GRAIN_PARAMS_AV1:
ret = ff_aom_apply_film_grain(fc->ref->frame_grain, fc->ref->frame, fgp); ret = ff_aom_apply_film_grain(fc->ref->frame_grain, fc->ref->frame, fgp);
if (ret < 0)
return ret;
break; break;
} }
} }
@@ -1099,7 +1103,7 @@ static int frame_end(VVCContext *s, VVCFrameContext *fc)
if (!s->avctx->hwaccel && s->avctx->err_recognition & AV_EF_CRCCHECK) { if (!s->avctx->hwaccel && s->avctx->err_recognition & AV_EF_CRCCHECK) {
VVCSEI *sei = &fc->sei; VVCSEI *sei = &fc->sei;
if (sei->picture_hash.present) { 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) if (ret < 0)
return ret; return ret;