1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

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

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