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
a84713e7
Commit
a84713e7
authored
Mar 21, 2016
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parseutils-test: Move some variable declarations to avoid block braces
parent
52385410
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
84 deletions
+80
-84
parseutils.c
libavutil/parseutils.c
+80
-84
No files found.
libavutil/parseutils.c
View file @
a84713e7
...
@@ -659,9 +659,8 @@ int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info
...
@@ -659,9 +659,8 @@ int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info
int
main
(
void
)
int
main
(
void
)
{
{
printf
(
"Testing av_parse_video_rate()
\n
"
);
{
int
i
;
int
i
;
uint8_t
rgba
[
4
];
static
const
char
*
const
rates
[]
=
{
static
const
char
*
const
rates
[]
=
{
"-inf"
,
"-inf"
,
"inf"
,
"inf"
,
...
@@ -689,20 +688,6 @@ int main(void)
...
@@ -689,20 +688,6 @@ int main(void)
" 21332.2324 "
,
" 21332.2324 "
,
" -21332.2324 "
,
" -21332.2324 "
,
};
};
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
rates
);
i
++
)
{
int
ret
;
AVRational
q
=
{
0
,
0
};
ret
=
av_parse_video_rate
(
&
q
,
rates
[
i
]);
printf
(
"'%s' -> %d/%d %s
\n
"
,
rates
[
i
],
q
.
num
,
q
.
den
,
ret
?
"ERROR"
:
"OK"
);
}
}
printf
(
"
\n
Testing av_parse_color()
\n
"
);
{
int
i
;
uint8_t
rgba
[
4
];
static
const
char
*
const
color_names
[]
=
{
static
const
char
*
const
color_names
[]
=
{
"foo"
,
"foo"
,
"red"
,
"red"
,
...
@@ -740,6 +725,18 @@ int main(void)
...
@@ -740,6 +725,18 @@ int main(void)
"red@-0.0"
,
"red@-0.0"
,
};
};
printf
(
"Testing av_parse_video_rate()
\n
"
);
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
rates
);
i
++
)
{
int
ret
;
AVRational
q
=
{
0
,
0
};
ret
=
av_parse_video_rate
(
&
q
,
rates
[
i
]);
printf
(
"'%s' -> %d/%d %s
\n
"
,
rates
[
i
],
q
.
num
,
q
.
den
,
ret
?
"ERROR"
:
"OK"
);
}
printf
(
"
\n
Testing av_parse_color()
\n
"
);
av_log_set_level
(
AV_LOG_DEBUG
);
av_log_set_level
(
AV_LOG_DEBUG
);
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
color_names
);
i
++
)
{
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
color_names
);
i
++
)
{
...
@@ -747,7 +744,6 @@ int main(void)
...
@@ -747,7 +744,6 @@ int main(void)
printf
(
"%s -> R(%d) G(%d) B(%d) A(%d)
\n
"
,
printf
(
"%s -> R(%d) G(%d) B(%d) A(%d)
\n
"
,
color_names
[
i
],
rgba
[
0
],
rgba
[
1
],
rgba
[
2
],
rgba
[
3
]);
color_names
[
i
],
rgba
[
0
],
rgba
[
1
],
rgba
[
2
],
rgba
[
3
]);
}
}
}
return
0
;
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