Unified · Split
| @@ -456,7 +456,7 @@ static av_cold int init(AVFilterContext *ctx) · 455 unmodified lines | ||
| 456 | 456 | AVFilterPad pad = { NULL }; |
| 457 | 457 | char *p, *arg, *saveptr = NULL; |
| 458 | 458 | unsigned long nb_ports; |
| 459 | − int i, j = 0; | |
| 459 | + int i, j = 0, ret; | |
| 460 | 460 | |
| 461 | 461 | if (!s->dl_name) { |
| 462 | 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 | 640 | pad.filter_frame = filter_frame; |
| 641 | 641 | 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; | |
| 646 | 644 | } |
| 647 | 645 | |
| 648 | 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 | 748 | av_freep(&s->octlv); |
| 751 | 749 | av_freep(&s->handles); |
| 752 | 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 | |
| 758 | 753 | static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, |