From 2142e719112d733b6eec9add8b2d30f6265a46a7 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 11 Aug 2021 22:02:44 +0200 Subject: avfilter/vf_extractplanes: Free outpads' names generically Reviewed-by: Nicolas George Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_extractplanes.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'libavfilter/vf_extractplanes.c') diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c index 54bfaeae5e..972cc17329 100644 --- a/libavfilter/vf_extractplanes.c +++ b/libavfilter/vf_extractplanes.c @@ -352,23 +352,13 @@ static av_cold int init(AVFilterContext *ctx) pad.type = AVMEDIA_TYPE_VIDEO; pad.config_props = config_output; - if ((ret = ff_append_outpad(ctx, &pad)) < 0) { - av_freep(&pad.name); + if ((ret = ff_append_outpad_free_name(ctx, &pad)) < 0) return ret; - } } return 0; } -static av_cold void uninit(AVFilterContext *ctx) -{ - int i; - - for (i = 0; i < ctx->nb_outputs; i++) - av_freep(&ctx->output_pads[i].name); -} - static const AVFilterPad extractplanes_inputs[] = { { .name = "default", @@ -384,7 +374,6 @@ const AVFilter ff_vf_extractplanes = { .priv_size = sizeof(ExtractPlanesContext), .priv_class = &extractplanes_class, .init = init, - .uninit = uninit, .query_formats = query_formats, FILTER_INPUTS(extractplanes_inputs), .outputs = NULL, @@ -408,7 +397,6 @@ const AVFilter ff_vf_alphaextract = { "grayscale image component."), .priv_size = sizeof(ExtractPlanesContext), .init = init_alphaextract, - .uninit = uninit, .query_formats = query_formats, FILTER_INPUTS(extractplanes_inputs), .outputs = NULL, -- cgit v1.2.3