Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
50ee1734
Commit
50ee1734
authored
Jun 20, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/formats: Add test for ff_parse_channel_layout()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bb9f4f94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
formats.c
libavfilter/formats.c
+29
-0
No files found.
libavfilter/formats.c
View file @
50ee1734
...
...
@@ -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
<
FF_ARRAY_ELEMS
(
teststrings
);
i
++
)
{
int64_t
layout
=
-
1
;
int
count
=
-
1
;
int
ret
;
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
]);
}
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment