This affects only the xmedian filter, not tmedian. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- libavfilter/vf_xmedian.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/libavfilter/vf_xmedian.c b/libavfilter/vf_xmedian.c index 168a5944db..c01f9ff202 100644 --- a/libavfilter/vf_xmedian.c +++ b/libavfilter/vf_xmedian.c @@ -121,10 +121,8 @@ static av_cold int init(AVFilterContext *ctx) if (!pad.name) return AVERROR(ENOMEM); - if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { - av_freep(&pad.name); + if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) return ret; - } } return 0; @@ -337,8 +335,6 @@ static av_cold void uninit(AVFilterContext *ctx) ff_framesync_uninit(&s->fs); - for (int i = 0; i < ctx->nb_inputs && !s->tmedian; i++) - av_freep(&ctx->input_pads[i].name); for (int i = 0; i < s->nb_frames && s->frames && s->tmedian; i++) av_frame_free(&s->frames[i]); av_freep(&s->frames); @@ -404,6 +400,7 @@ const AVFilter ff_vf_xmedian = { .activate = activate, .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, + .flags_internal = FF_FILTER_FLAG_FREE_INPADS, .process_command = process_command, }; -- 2.30.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".