Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
7e934408
Commit
7e934408
authored
Jun 17, 2013
by
John Koleszar
Committed by
Gerrit Code Review
Jun 17, 2013
Browse files
Merge "vpxdec: add --loops option"
parents
5677b25b
9596a4cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
vpxdec.c
View file @
7e934408
...
...
@@ -67,6 +67,8 @@ static const struct {
};
#include
"args.h"
static
const
arg_def_t
looparg
=
ARG_DEF
(
NULL
,
"loops"
,
1
,
"Number of times to decode the file"
);
static
const
arg_def_t
codecarg
=
ARG_DEF
(
NULL
,
"codec"
,
1
,
"Codec to use"
);
static
const
arg_def_t
use_yv12
=
ARG_DEF
(
NULL
,
"yv12"
,
0
,
...
...
@@ -676,7 +678,7 @@ void generate_filename(const char *pattern, char *out, size_t q_len,
}
int
main
(
int
argc
,
const
char
**
argv_
)
{
int
main
_loop
(
int
argc
,
const
char
**
argv_
)
{
vpx_codec_ctx_t
decoder
;
char
*
fn
=
NULL
;
int
i
;
...
...
@@ -737,6 +739,8 @@ int main(int argc, const char **argv_) {
else
die
(
"Error: Unrecognized argument (%s) to --codec
\n
"
,
arg
.
val
);
}
else
if
(
arg_match
(
&
arg
,
&
looparg
,
argi
))
{
// no-op
}
else
if
(
arg_match
(
&
arg
,
&
outputfile
,
argi
))
outfile_pattern
=
arg
.
val
;
else
if
(
arg_match
(
&
arg
,
&
use_yv12
,
argi
))
{
...
...
@@ -1152,3 +1156,25 @@ fail:
return
frames_corrupted
?
EXIT_FAILURE
:
EXIT_SUCCESS
;
}
int
main
(
int
argc
,
const
char
**
argv_
)
{
unsigned
int
loops
=
1
,
i
;
char
**
argv
,
**
argi
,
**
argj
;
struct
arg
arg
;
int
error
=
0
;
argv
=
argv_dup
(
argc
-
1
,
argv_
+
1
);
for
(
argi
=
argj
=
argv
;
(
*
argj
=
*
argi
);
argi
+=
arg
.
argv_step
)
{
memset
(
&
arg
,
0
,
sizeof
(
arg
));
arg
.
argv_step
=
1
;
if
(
arg_match
(
&
arg
,
&
looparg
,
argi
))
{
loops
=
arg_parse_uint
(
&
arg
);
break
;
}
}
free
(
argv
);
for
(
i
=
0
;
!
error
&&
i
<
loops
;
i
++
)
error
=
main_loop
(
argc
,
argv_
);
return
error
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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