Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-08-31 17:03:14 +0300
committerJames Almer <jamrial@gmail.com>2022-03-15 15:42:46 +0300
commit1f96db959c1235bb7079d354e09914a0a2608f62 (patch)
tree21ac480d5b148c0524761853e6badb3a90a7ca3f /libavfilter/tests
parent8a5896ec1f635ccf0d726f7ba7a06649ebeebf25 (diff)
avfilter: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter/tests')
-rw-r--r--libavfilter/tests/filtfmts.c3
-rw-r--r--libavfilter/tests/formats.c9
2 files changed, 7 insertions, 5 deletions
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<FF_ARRAY_ELEMS(teststrings); i++) {
- int64_t layout = -1;
int count = -1;
int ret;
+ av_channel_layout_uninit(&layout);
ret = ff_parse_channel_layout(&layout, &count, teststrings[i], NULL);
- printf ("%d = ff_parse_channel_layout(%016"PRIX64", %2d, %s);\n", ret ? -1 : 0, layout, count, teststrings[i]);
+ printf ("%d = ff_parse_channel_layout(%016"PRIX64", %2d, %s);\n", ret ? -1 : 0, layout.order == AV_CHANNEL_ORDER_NATIVE ? layout.u.mask : 0, count, teststrings[i]);
}
return 0;