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
b1d6e5e8
Commit
b1d6e5e8
authored
Aug 03, 2009
by
Benoit Fouet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle noX for OPT_BOOL X.
Originally committed as revision 19572 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
33ae681f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
cmdutils.c
cmdutils.c
+9
-1
No files found.
cmdutils.c
View file @
b1d6e5e8
...
...
@@ -125,11 +125,19 @@ void parse_options(int argc, char **argv, const OptionDef *options,
opt
=
argv
[
optindex
++
];
if
(
handleoptions
&&
opt
[
0
]
==
'-'
&&
opt
[
1
]
!=
'\0'
)
{
int
bool_val
=
1
;
if
(
opt
[
1
]
==
'-'
&&
opt
[
2
]
==
'\0'
)
{
handleoptions
=
0
;
continue
;
}
po
=
find_option
(
options
,
opt
+
1
);
if
(
!
po
->
name
&&
opt
[
1
]
==
'n'
&&
opt
[
2
]
==
'o'
)
{
/* handle 'no' bool option */
po
=
find_option
(
options
,
opt
+
3
);
if
(
!
(
po
->
name
&&
(
po
->
flags
&
OPT_BOOL
)))
goto
unknown_opt
;
bool_val
=
0
;
}
if
(
!
po
->
name
)
po
=
find_option
(
options
,
"default"
);
if
(
!
po
->
name
)
{
...
...
@@ -150,7 +158,7 @@ unknown_opt:
str
=
av_strdup
(
arg
);
*
po
->
u
.
str_arg
=
str
;
}
else
if
(
po
->
flags
&
OPT_BOOL
)
{
*
po
->
u
.
int_arg
=
1
;
*
po
->
u
.
int_arg
=
bool_val
;
}
else
if
(
po
->
flags
&
OPT_INT
)
{
*
po
->
u
.
int_arg
=
parse_number_or_die
(
opt
+
1
,
arg
,
OPT_INT64
,
INT_MIN
,
INT_MAX
);
}
else
if
(
po
->
flags
&
OPT_INT64
)
{
...
...
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