History

avfilter/af_ladspa: Free inpad's name generically

Andreas Rheinhardt committed 5 years ago

Commit 7670e241 parent d2e72471 file · +3 −8Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_ladspa.c+3−8
@@ -456,7 +456,7 @@ static av_cold int init(AVFilterContext *ctx) · 455 unmodified lines
456456 AVFilterPad pad = { NULL };
457457 char *p, *arg, *saveptr = NULL;
458458 unsigned long nb_ports;
459− int i, j = 0;
459+ int i, j = 0, ret;
460460
461461 if (!s->dl_name) {
462462 av_log(ctx, AV_LOG_ERROR, "No plugin name provided\n");
@@ -639,10 +639,8 @@ static av_cold int init(AVFilterContext *ctx) · 176 unmodified lines
639639
640640 pad.filter_frame = filter_frame;
641641 pad.config_props = config_input;
642− if (ff_append_inpad(ctx, &pad) < 0) {
643− av_freep(&pad.name);
644− return AVERROR(ENOMEM);
645− }
642+ if ((ret = ff_append_inpad_free_name(ctx, &pad)) < 0)
643+ return ret;
646644 }
647645
648646 av_log(ctx, AV_LOG_DEBUG, "ports: %lu\n", nb_ports);
@@ -750,9 +748,6 @@ static av_cold void uninit(AVFilterContext *ctx) · 101 unmodified lines
750748 av_freep(&s->octlv);
751749 av_freep(&s->handles);
752750 av_freep(&s->ctl_needs_value);
753−
754− if (ctx->nb_inputs)
755− av_freep(&ctx->input_pads[0].name);
756751 }
757752
758753 static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t