From 1f96db959c1235bb7079d354e09914a0a2608f62 Mon Sep 17 00:00:00 2001 From: James Almer Date: Tue, 31 Aug 2021 11:03:14 -0300 Subject: avfilter: convert to new channel layout API Signed-off-by: James Almer --- libavfilter/tests/filtfmts.c | 3 +-- libavfilter/tests/formats.c | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'libavfilter/tests') diff --git a/libavfilter/tests/filtfmts.c b/libavfilter/tests/filtfmts.c index d793480344..909c1e8dc9 100644 --- a/libavfilter/tests/filtfmts.c +++ b/libavfilter/tests/filtfmts.c @@ -59,8 +59,7 @@ static void print_formats_internal(AVFilterLink **links, const AVFilterPad *pads for (unsigned j = 0; layouts && j < layouts->nb_channel_layouts; j++) { char buf[256]; - av_get_channel_layout_string(buf, sizeof(buf), -1, - layouts->channel_layouts[j]); + av_channel_layout_describe(&layouts->channel_layouts[j], buf, sizeof(buf)); printf("%s[%u] %s: chlayout:%s\n", inout_string, i, pad_name, buf); } diff --git a/libavfilter/tests/formats.c b/libavfilter/tests/formats.c index c1e30e73ee..2bdceb0d21 100644 --- a/libavfilter/tests/formats.c +++ b/libavfilter/tests/formats.c @@ -97,6 +97,7 @@ const int64_t avfilter_all_channel_layouts[] = { int main(void) { + AVChannelLayout layout = { 0 }; const int64_t *cl; char buf[512]; int i; @@ -124,17 +125,19 @@ int main(void) }; for (cl = avfilter_all_channel_layouts; *cl != -1; cl++) { - av_get_channel_layout_string(buf, sizeof(buf), -1, *cl); + av_channel_layout_from_mask(&layout, *cl); + av_channel_layout_describe(&layout, buf, sizeof(buf)); printf("%s\n", buf); + av_channel_layout_uninit(&layout); } for ( i = 0; i