aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-06 15:10:43 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-09 16:38:28 +0200
commit358c0bb168aa00fce3075954a0932a1be6d04347 (patch)
tree480921fe3e1b27e313132133ca1bce53f9c64576
parentaa262dcce850e7d0361bb6c78d833f7249543712 (diff)
downloadffmpeg-358c0bb168aa00fce3075954a0932a1be6d04347.tar.gz
avfilter/vf_minterpolate: Remove redundant code for freeing
ad73b32d2922f4237405043d19763229aee0e59e added some code for freeing in the input's config_props function, yet this is unnecessary as uninit is called anyway if config_props fails. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r--libavfilter/vf_minterpolate.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c
index bf45662913..969463f021 100644
--- a/libavfilter/vf_minterpolate.c
+++ b/libavfilter/vf_minterpolate.c
@@ -340,7 +340,7 @@ static int config_input(AVFilterLink *inlink)
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
const int height = inlink->h;
const int width = inlink->w;
- int i, ret = 0;
+ int i;
mi_ctx->log2_chroma_h = desc->log2_chroma_h;
mi_ctx->log2_chroma_w = desc->log2_chroma_w;
@@ -380,10 +380,8 @@ static int config_input(AVFilterLink *inlink)
mi_ctx->pixel_mvs = av_mallocz_array(width * height, sizeof(PixelMVS));
mi_ctx->pixel_weights = av_mallocz_array(width * height, sizeof(PixelWeights));
mi_ctx->pixel_refs = av_mallocz_array(width * height, sizeof(PixelRefs));
- if (!mi_ctx->pixel_mvs || !mi_ctx->pixel_weights || !mi_ctx->pixel_refs) {
- ret = AVERROR(ENOMEM);
- goto fail;
- }
+ if (!mi_ctx->pixel_mvs || !mi_ctx->pixel_weights || !mi_ctx->pixel_refs)
+ return AVERROR(ENOMEM);
if (mi_ctx->me_mode == ME_MODE_BILAT)
if (!(mi_ctx->int_blocks = av_mallocz_array(mi_ctx->b_count, sizeof(Block))))
@@ -405,13 +403,6 @@ static int config_input(AVFilterLink *inlink)
}
return 0;
-fail:
- for (i = 0; i < NB_FRAMES; i++)
- av_freep(&mi_ctx->frames[i].blocks);
- av_freep(&mi_ctx->pixel_mvs);
- av_freep(&mi_ctx->pixel_weights);
- av_freep(&mi_ctx->pixel_refs);
- return ret;
}
static int config_output(AVFilterLink *outlink)