Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- This is how one of the two filters that make use of setting AVFITLERPAD_FLAG_FREE_NAME directly are handled now. headphone is the other one. Furthermore, the newly added segment filters can also be simplified by this method. I think I can avoid (re)sending the rest of the patchset. If you think otherwise, just say so and I will send it.
libavfilter/af_afir.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c index 670a8c837b..f26ca03810 100644 --- a/libavfilter/af_afir.c +++ b/libavfilter/af_afir.c @@ -792,9 +792,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_frame_free(&s->ir[i]); } - for (unsigned i = 1; i < ctx->nb_inputs; i++) - av_freep(&ctx->input_pads[i].name); - av_frame_free(&s->video); } @@ -844,16 +841,15 @@ static av_cold int init(AVFilterContext *ctx) pad = (AVFilterPad) { .name = av_asprintf("ir%d", n), .type = AVMEDIA_TYPE_AUDIO, + .flags = AVFILTERPAD_FLAG_FREE_NAME, }; if (!pad.name) return AVERROR(ENOMEM); ret = ff_insert_inpad(ctx, &pad); - if (ret < 0) { - av_freep(&pad.name); + if (ret < 0) return ret; - } } pad = (AVFilterPad) { -- 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".