You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
parseutils-test: various cleanups
- make tables static const - remove useless use of compound literal - break long lines - fix a comma/semicolon typo Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
@@ -650,7 +650,7 @@ int main(void)
|
|||||||
printf("Testing av_parse_video_rate()\n");
|
printf("Testing av_parse_video_rate()\n");
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const char *rates[] = {
|
static const char *const rates[] = {
|
||||||
"-inf",
|
"-inf",
|
||||||
"inf",
|
"inf",
|
||||||
"nan",
|
"nan",
|
||||||
@@ -680,8 +680,8 @@ int main(void)
|
|||||||
|
|
||||||
for (i = 0; i < FF_ARRAY_ELEMS(rates); i++) {
|
for (i = 0; i < FF_ARRAY_ELEMS(rates); i++) {
|
||||||
int ret;
|
int ret;
|
||||||
AVRational q = (AVRational){0, 0};
|
AVRational q = { 0, 0 };
|
||||||
ret = av_parse_video_rate(&q, rates[i]),
|
ret = av_parse_video_rate(&q, rates[i]);
|
||||||
printf("'%s' -> %d/%d %s\n",
|
printf("'%s' -> %d/%d %s\n",
|
||||||
rates[i], q.num, q.den, ret ? "ERROR" : "OK");
|
rates[i], q.num, q.den, ret ? "ERROR" : "OK");
|
||||||
}
|
}
|
||||||
@@ -691,7 +691,7 @@ int main(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
uint8_t rgba[4];
|
uint8_t rgba[4];
|
||||||
const char *color_names[] = {
|
static const char *const color_names[] = {
|
||||||
"foo",
|
"foo",
|
||||||
"red",
|
"red",
|
||||||
"Red ",
|
"Red ",
|
||||||
@@ -732,7 +732,8 @@ int main(void)
|
|||||||
|
|
||||||
for (i = 0; i < FF_ARRAY_ELEMS(color_names); i++) {
|
for (i = 0; i < FF_ARRAY_ELEMS(color_names); i++) {
|
||||||
if (av_parse_color(rgba, color_names[i], -1, NULL) >= 0)
|
if (av_parse_color(rgba, color_names[i], -1, NULL) >= 0)
|
||||||
printf("%s -> R(%d) G(%d) B(%d) A(%d)\n", color_names[i], rgba[0], rgba[1], rgba[2], rgba[3]);
|
printf("%s -> R(%d) G(%d) B(%d) A(%d)\n",
|
||||||
|
color_names[i], rgba[0], rgba[1], rgba[2], rgba[3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user