diff options
author | Paul B Mahol | 2019-09-30 16:39:39 +0200 |
---|---|---|
committer | Paul B Mahol | 2019-09-30 16:39:39 +0200 |
commit | 6e9e14e62e995bb4326038376b88de190547adde (patch) | |
tree | c68f32f6649b7b2fff337228c79f9fb6df200a5c | |
parent | 8b36968ef465a01dbb32bdfc6d1c41dd0a8b8158 (diff) |
avfilter/split: use av_asprintf()
-rw-r--r-- | libavfilter/split.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavfilter/split.c b/libavfilter/split.c index 89af360cb0..622838d83d 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -26,6 +26,7 @@ #include <stdio.h> #include "libavutil/attributes.h" +#include "libavutil/avstring.h" #include "libavutil/internal.h" #include "libavutil/mem.h" #include "libavutil/opt.h" @@ -48,12 +49,10 @@ static av_cold int split_init(AVFilterContext *ctx) int i, ret; for (i = 0; i < s->nb_outputs; i++) { - char name[32]; AVFilterPad pad = { 0 }; - snprintf(name, sizeof(name), "output%d", i); pad.type = ctx->filter->inputs[0].type; - pad.name = av_strdup(name); + pad.name = av_asprintf("output%d", i); if (!pad.name) return AVERROR(ENOMEM); |