From 50ee17340b9fc2aca04fb41169ef90a290248141 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 20 Jun 2015 14:01:22 +0200 Subject: [PATCH] avfilter/formats: Add test for ff_parse_channel_layout() Signed-off-by: Michael Niedermayer --- libavfilter/formats.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 4f9773bd15..2451bf70c9 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -669,12 +669,41 @@ int main(void) { const int64_t *cl; char buf[512]; + int i; + const char *teststrings[] ={ + "blah", + "1", + "2", + "-1", + "60", + "65", + "1c", + "2c", + "-1c", + "60c", + "65c", + "5.1", + "stereo", + "1+1+1+1", + "1c+1c+1c+1c", + "2c+1c", + "0x3", + }; for (cl = avfilter_all_channel_layouts; *cl != -1; cl++) { av_get_channel_layout_string(buf, sizeof(buf), -1, *cl); printf("%s\n", buf); } + for ( i = 0; i