[FFmpeg-cvslog] avfilter/af_join: use av_asprintf()
Paul B Mahol
git at videolan.org
Mon Sep 30 17:51:42 EEST 2019
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Sep 30 16:45:31 2019 +0200| [7851e2f368d82e491cd9a82a9ff0b94652251d6d] | committer: Paul B Mahol
avfilter/af_join: use av_asprintf()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7851e2f368d82e491cd9a82a9ff0b94652251d6d
---
libavfilter/af_join.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index 930c9e48e7..8269045d36 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -25,6 +25,7 @@
*/
#include "libavutil/avassert.h"
+#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
@@ -185,12 +186,10 @@ static av_cold int join_init(AVFilterContext *ctx)
return ret;
for (i = 0; i < s->inputs; i++) {
- char name[32];
AVFilterPad pad = { 0 };
- snprintf(name, sizeof(name), "input%d", i);
pad.type = AVMEDIA_TYPE_AUDIO;
- pad.name = av_strdup(name);
+ pad.name = av_asprintf("input%d", i);
if (!pad.name)
return AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list