aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2023-12-29 13:41:42 +0100
committerMarton Balint <cus@passwd.hu>2024-01-07 22:47:22 +0100
commit363b3ec98a0fd49ca9144ac1b16c272a14e1b0df (patch)
tree4cf6e25183ca7cb05df6db0344bc8f7e7550950a /libavcodec
parente4c96dc96ccea3c74373b5be5bacd94049b429e2 (diff)
downloadffmpeg-363b3ec98a0fd49ca9144ac1b16c272a14e1b0df.tar.gz
all: use av_channel_layout_describe_bprint instead of av_channel_layout_describe in a few places
Where an AVBPrint buffer is used later anyway. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avcodec.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index 2dda310e91..a6c8629f6c 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -656,12 +656,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
if (enc->sample_rate) {
av_bprintf(&bprint, "%d Hz, ", enc->sample_rate);
}
- {
- char buf[512];
- int ret = av_channel_layout_describe(&enc->ch_layout, buf, sizeof(buf));
- if (ret >= 0)
- av_bprintf(&bprint, "%s", buf);
- }
+ av_channel_layout_describe_bprint(&enc->ch_layout, &bprint);
if (enc->sample_fmt != AV_SAMPLE_FMT_NONE &&
(str = av_get_sample_fmt_name(enc->sample_fmt))) {
av_bprintf(&bprint, ", %s", str);