summaryrefslogtreecommitdiff
path: root/libavfilter/f_segment.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-17 02:29:50 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-22 16:14:03 +0200
commitf6c6a51d988763fe92961ff483c6d5eb98055f38 (patch)
treeb6669bfe1d021004421ff018899b702fc1838ace /libavfilter/f_segment.c
parentb8e31568dfee086e068b1148e62d42682edf9041 (diff)
avfilter/f_segment: Free outpads' names generically
Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/f_segment.c')
-rw-r--r--libavfilter/f_segment.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavfilter/f_segment.c b/libavfilter/f_segment.c
index f40b18839c..e9b574d5bc 100644
--- a/libavfilter/f_segment.c
+++ b/libavfilter/f_segment.c
@@ -137,10 +137,8 @@ static av_cold int init(AVFilterContext *ctx, enum AVMediaType type)
if (!pad.name)
return AVERROR(ENOMEM);
- 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;
@@ -245,9 +243,6 @@ static av_cold void uninit(AVFilterContext *ctx)
SegmentContext *s = ctx->priv;
av_freep(&s->points);
-
- for (unsigned i = 0; i < ctx->nb_outputs; i++)
- av_freep(&ctx->output_pads[i].name);
}
#define OFFSET(x) offsetof(SegmentContext, x)