History

avfilter/af_ladspa: Free inpad's name generically

Andreas Rheinhardt committed 5 years ago

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

Unified · Split

libavfilter/af_ladspa.c+3−8
@@ -456,7 +456,7 @@ static av_cold int init(AVFilterContext *ctx) · 455 unmodified lines
456 AVFilterPad pad = { NULL };456 AVFilterPad pad = { NULL };
457 char *p, *arg, *saveptr = NULL;457 char *p, *arg, *saveptr = NULL;
458 unsigned long nb_ports;458 unsigned long nb_ports;
459 int i, j = 0;459 int i, j = 0, ret;
460 460
461 if (!s->dl_name) {461 if (!s->dl_name) {
462 av_log(ctx, AV_LOG_ERROR, "No plugin name provided\n");462 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
639 639
640 pad.filter_frame = filter_frame;640 pad.filter_frame = filter_frame;
641 pad.config_props = config_input;641 pad.config_props = config_input;
642 if (ff_append_inpad(ctx, &pad) < 0) {642 if ((ret = ff_append_inpad_free_name(ctx, &pad)) < 0)
643 av_freep(&pad.name);643 return ret;
644 return AVERROR(ENOMEM);
645 }
646 }644 }
647 645
648 av_log(ctx, AV_LOG_DEBUG, "ports: %lu\n", nb_ports);646 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
750 av_freep(&s->octlv);748 av_freep(&s->octlv);
751 av_freep(&s->handles);749 av_freep(&s->handles);
752 av_freep(&s->ctl_needs_value);750 av_freep(&s->ctl_needs_value);
753
754 if (ctx->nb_inputs)
755 av_freep(&ctx->input_pads[0].name);
756}751}
757 752
758static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,753static 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