diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-26 12:36:33 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-27 18:16:59 +0200 |
commit | 48348cd4aba9cdc5504e8cc7ad1562be192f61ba (patch) | |
tree | 888350f3691f8f0cc976628a2adaa8cdc48bcae1 /libavfilter/graphdump.c | |
parent | daeef7d220d2c62a3390a6674e8c1e08f17de85a (diff) | |
download | ffmpeg-48348cd4aba9cdc5504e8cc7ad1562be192f61ba.tar.gz |
avfilter/graphdump: Don't silently truncate channel layout string
64B are not enough any more.
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/graphdump.c')
-rw-r--r-- | libavfilter/graphdump.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavfilter/graphdump.c b/libavfilter/graphdump.c index 22b2e21559..cf3296550c 100644 --- a/libavfilter/graphdump.c +++ b/libavfilter/graphdump.c @@ -30,7 +30,6 @@ static int print_link_prop(AVBPrint *buf, AVFilterLink *link) { char *format; - char layout[64]; AVBPrint dummy_buffer; if (!buf) { @@ -47,11 +46,11 @@ static int print_link_prop(AVBPrint *buf, AVFilterLink *link) break; case AVMEDIA_TYPE_AUDIO: - av_get_channel_layout_string(layout, sizeof(layout), - link->channels, link->channel_layout); format = av_x_if_null(av_get_sample_fmt_name(link->format), "?"); - av_bprintf(buf, "[%dHz %s:%s]", - (int)link->sample_rate, format, layout); + av_bprintf(buf, "[%dHz %s:", + (int)link->sample_rate, format); + av_bprint_channel_layout(buf, link->channels, link->channel_layout); + av_bprint_chars(buf, ']', 1); break; default: |