diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-11-29 12:25:02 +0100 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-11-29 12:55:56 +0100 |
commit | a7eabbb20dc077d7380f874b9c35fffa478186a6 (patch) | |
tree | dce982fae133629249b130640d8bf0ca6f2d97f7 /libavfilter | |
parent | b99f1303ad9ccf09c69f7300e291fee47187d816 (diff) | |
download | ffmpeg-a7eabbb20dc077d7380f874b9c35fffa478186a6.tar.gz |
lavfi/concat: prefer av_asprintf() over stack allocated buffer.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avf_concat.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index eb132822e2..6be2c53778 100644 --- a/libavfilter/avf_concat.c +++ b/libavfilter/avf_concat.c @@ -24,6 +24,7 @@ */ #include "libavutil/avassert.h" +#include "libavutil/avstring.h" #include "libavutil/channel_layout.h" #include "libavutil/opt.h" #include "avfilter.h" @@ -344,7 +345,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args) ConcatContext *cat = ctx->priv; int ret; unsigned seg, type, str; - char name[32]; cat->class = &concat_class; av_opt_set_defaults(cat); @@ -365,8 +365,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) .get_audio_buffer = get_audio_buffer, .filter_frame = filter_frame, }; - snprintf(name, sizeof(name), "in%d:%c%d", seg, "va"[type], str); - pad.name = av_strdup(name); + pad.name = av_asprintf("in%d:%c%d", seg, "va"[type], str); ff_insert_inpad(ctx, ctx->nb_inputs, &pad); } } @@ -379,8 +378,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) .config_props = config_output, .request_frame = request_frame, }; - snprintf(name, sizeof(name), "out:%c%d", "va"[type], str); - pad.name = av_strdup(name); + pad.name = av_asprintf("out:%c%d", "va"[type], str); ff_insert_outpad(ctx, ctx->nb_outputs, &pad); } } |