summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-03-25 11:36:20 -0300
committerJames Almer <jamrial@gmail.com>2022-03-25 12:09:21 -0300
commitcbeb827cfbda590ee8c81572d1c11c4841e77fd9 (patch)
treeb709595039a6685231d95b0337165f7af514caa3 /libavutil
parent95ac380252f70f0e36438b3bfeb4161f7a144472 (diff)
avutil/tests/channel_layout: test av_channel_layout_check()
Should increase test coverage Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/tests/channel_layout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavutil/tests/channel_layout.c b/libavutil/tests/channel_layout.c
index eb9cf1b950..34f1197bfd 100644
--- a/libavutil/tests/channel_layout.c
+++ b/libavutil/tests/channel_layout.c
@@ -31,7 +31,8 @@
#define CHANNEL_LAYOUT_FROM_MASK(x) \
av_channel_layout_uninit(&layout); \
av_bprint_clear(&bp); \
- if (!av_channel_layout_from_mask(&layout, x)) \
+ if (!av_channel_layout_from_mask(&layout, x) && \
+ av_channel_layout_check(&layout)) \
av_channel_layout_describe_bprint(&layout, &bp); \
else \
av_bprintf(&bp, "fail");
@@ -39,7 +40,8 @@
#define CHANNEL_LAYOUT_FROM_STRING(x) \
av_channel_layout_uninit(&layout); \
av_bprint_clear(&bp); \
- if (!av_channel_layout_from_string(&layout, x)) \
+ if (!av_channel_layout_from_string(&layout, x) && \
+ av_channel_layout_check(&layout)) \
av_channel_layout_describe_bprint(&layout, &bp); \
else \
av_bprintf(&bp, "fail");