summaryrefslogtreecommitdiff
path: root/libavfilter/vf_extractplanes.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-11 22:02:44 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-22 16:15:33 +0200
commit2142e719112d733b6eec9add8b2d30f6265a46a7 (patch)
treef5e83e9522b650ddc397378a01ae7bc736d0c1be /libavfilter/vf_extractplanes.c
parent41c98bfe0a6fc614e3e4046f2fba8e9ebf75a134 (diff)
avfilter/vf_extractplanes: Free outpads' names generically
Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_extractplanes.c')
-rw-r--r--libavfilter/vf_extractplanes.c14
1 files changed, 1 insertions, 13 deletions
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,