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
f7324c06
Commit
f7324c06
authored
Mar 24, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/perms: use standard options parsing.
parent
07b7c2a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
f_perms.c
libavfilter/f_perms.c
+4
-9
No files found.
libavfilter/f_perms.c
View file @
f7324c06
...
...
@@ -52,21 +52,12 @@ static const AVOption options[] = {
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
,
const
AVClass
*
class
)
{
int
ret
;
PermsContext
*
perms
=
ctx
->
priv
;
static
const
char
*
shorthand
[]
=
{
"mode"
,
NULL
};
perms
->
class
=
class
;
av_opt_set_defaults
(
perms
);
if
((
ret
=
av_opt_set_from_string
(
perms
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
// TODO: add a seed option
if
(
perms
->
mode
==
MODE_RANDOM
)
av_lfg_init
(
&
perms
->
lfg
,
av_get_random_seed
());
av_opt_free
(
perms
);
return
0
;
}
...
...
@@ -110,6 +101,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
return
ret
;
}
static
const
char
*
const
shorthand
[]
=
{
"mode"
,
NULL
};
#if CONFIG_APERMS_FILTER
#define aperms_options options
...
...
@@ -145,6 +138,7 @@ AVFilter avfilter_af_aperms = {
.
inputs
=
aperms_inputs
,
.
outputs
=
aperms_outputs
,
.
priv_class
=
&
aperms_class
,
.
shorthand
=
shorthand
,
};
#endif
/* CONFIG_APERMS_FILTER */
...
...
@@ -183,5 +177,6 @@ AVFilter avfilter_vf_perms = {
.
inputs
=
perms_inputs
,
.
outputs
=
perms_outputs
,
.
priv_class
=
&
perms_class
,
.
shorthand
=
shorthand
,
};
#endif
/* CONFIG_PERMS_FILTER */
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