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
de3e0ab3
Commit
de3e0ab3
authored
Mar 13, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/delogo: remove sscanf and rely on av_opt_set_from_string() only.
parent
20dab078
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
vf_delogo.c
libavfilter/vf_delogo.c
+5
-8
No files found.
libavfilter/vf_delogo.c
View file @
de3e0ab3
...
...
@@ -172,17 +172,12 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
{
DelogoContext
*
delogo
=
ctx
->
priv
;
int
ret
=
0
;
static
const
char
*
shorthand
[]
=
{
"x"
,
"y"
,
"w"
,
"h"
,
"band"
};
delogo
->
class
=
&
delogo_class
;
av_opt_set_defaults
(
delogo
);
if
(
args
)
ret
=
sscanf
(
args
,
"%d:%d:%d:%d:%d"
,
&
delogo
->
x
,
&
delogo
->
y
,
&
delogo
->
w
,
&
delogo
->
h
,
&
delogo
->
band
);
if
(
ret
==
5
)
{
if
(
delogo
->
band
<
0
)
delogo
->
show
=
1
;
}
else
if
((
ret
=
(
av_set_options_string
(
delogo
,
args
,
"="
,
":"
)))
<
0
)
if
((
ret
=
av_opt_set_from_string
(
delogo
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
#define CHECK_UNSET_OPT(opt) \
...
...
@@ -195,8 +190,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
CHECK_UNSET_OPT
(
w
);
CHECK_UNSET_OPT
(
h
);
if
(
delogo
->
show
)
if
(
delogo
->
band
<
0
||
delogo
->
show
)
{
delogo
->
show
=
1
;
delogo
->
band
=
4
;
}
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"x:%d y:%d, w:%d h:%d band:%d show:%d
\n
"
,
delogo
->
x
,
delogo
->
y
,
delogo
->
w
,
delogo
->
h
,
delogo
->
band
,
delogo
->
show
);
...
...
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