avutil/tests/channel_layout: test av_channel_layout_check()

Should increase test coverage

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2022-03-25 11:36:20 -03:00
parent 95ac380252
commit cbeb827cfb
1 changed files with 4 additions and 2 deletions

View File

@ -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");