diff options
author | Marton Balint <cus@passwd.hu> | 2022-03-15 20:43:50 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2022-03-15 23:19:24 +0100 |
commit | bd40375dd2573aa5ed08294957b6d2864b4dd250 (patch) | |
tree | 148113816d5bfd7350e445dd46c91d944c7bebf5 /libavutil | |
parent | bf5099b12be3a82094580219fdf367dbe2a70d27 (diff) | |
download | ffmpeg-bd40375dd2573aa5ed08294957b6d2864b4dd250.tar.gz |
avutil/channel_layout: print channels using av_channel_name_bprint in av_channel_layout_describe_bprint
This reduces code duplication an allows printing AMBI%d channel names for
custom layouts for non-standard or partial ambisonic layouts.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/channel_layout.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index 8cc4efe4cf..c60ccf368f 100644 --- a/libavutil/channel_layout.c +++ b/libavutil/channel_layout.c @@ -737,14 +737,10 @@ int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout, av_bprintf(bp, "%d channels (", channel_layout->nb_channels); for (i = 0; i < channel_layout->nb_channels; i++) { enum AVChannel ch = av_channel_layout_channel_from_index(channel_layout, i); - const char *channel = get_channel_name(ch); if (i) av_bprintf(bp, "+"); - if (channel) - av_bprintf(bp, "%s", channel); - else - av_bprintf(bp, "USR%d", ch); + av_channel_name_bprint(bp, ch); if (channel_layout->order == AV_CHANNEL_ORDER_CUSTOM && channel_layout->u.map[i].name[0]) av_bprintf(bp, "@%s", channel_layout->u.map[i].name); |