diff mbox series

[FFmpeg-devel,v3,21/25] avfilter/vf_program_opencl: Free inpads' names generically

Message ID PR3PR03MB66658FFBFE8F32D63207CA2D8FC39@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 65884bd81fe71fd4f29f3e7495f3970e482e7904
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/vf_program_opencl.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_program_opencl.c b/libavfilter/vf_program_opencl.c
index d80aa9be04..fdc6b4dcd1 100644
--- a/libavfilter/vf_program_opencl.c
+++ b/libavfilter/vf_program_opencl.c
@@ -287,11 +287,9 @@  static av_cold int program_opencl_init(AVFilterContext *avctx)
 
             input.config_props = &ff_opencl_filter_config_input;
 
-            err = ff_append_inpad(avctx, &input);
-            if (err < 0) {
-                av_freep(&input.name);
+            err = ff_append_inpad_free_name(avctx, &input);
+            if (err < 0)
                 return err;
-            }
         }
     }
 
@@ -302,14 +300,11 @@  static av_cold void program_opencl_uninit(AVFilterContext *avctx)
 {
     ProgramOpenCLContext *ctx = avctx->priv;
     cl_int cle;
-    int i;
 
     if (ctx->nb_inputs > 0) {
         ff_framesync_uninit(&ctx->fs);
 
         av_freep(&ctx->frames);
-        for (i = 0; i < avctx->nb_inputs; i++)
-            av_freep(&avctx->input_pads[i].name);
     }
 
     if (ctx->kernel) {