diff mbox series

[FFmpeg-devel,v3,14/25] avfilter/f_select: Free outpads' names generically

Message ID PR3PR03MB6665801BD3D37073393D5B198FC39@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 64133506f7894a93bbd143b54224a6e85cdb59fe
Headers show
Series [FFmpeg-devel,v3,01/25] avfilter/internal: Uninline ff_insert_(in|out)pad() | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 22, 2021, 12:47 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/f_select.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
index fad54ab16a..187e98a1a7 100644
--- a/libavfilter/f_select.c
+++ b/libavfilter/f_select.c
@@ -192,10 +192,8 @@  static av_cold int init(AVFilterContext *ctx)
             return AVERROR(ENOMEM);
         pad.type = ctx->filter->inputs[0].type;
         pad.request_frame = request_frame;
-        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;
@@ -432,14 +430,10 @@  static int request_frame(AVFilterLink *outlink)
 static av_cold void uninit(AVFilterContext *ctx)
 {
     SelectContext *select = ctx->priv;
-    int i;
 
     av_expr_free(select->expr);
     select->expr = NULL;
 
-    for (i = 0; i < ctx->nb_outputs; i++)
-        av_freep(&ctx->output_pads[i].name);
-
     if (select->do_scene_detect) {
         av_frame_free(&select->prev_picref);
     }