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
4e2bcec9
Commit
4e2bcec9
authored
Mar 16, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/vf_fade: use standard options parsing.
parent
80580b40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
16 deletions
+3
-16
vf_fade.c
libavfilter/vf_fade.c
+3
-16
No files found.
libavfilter/vf_fade.c
View file @
4e2bcec9
...
...
@@ -78,14 +78,6 @@ AVFILTER_DEFINE_CLASS(fade);
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
FadeContext
*
fade
=
ctx
->
priv
;
static
const
char
*
shorthand
[]
=
{
"type"
,
"start_frame"
,
"nb_frames"
,
NULL
};
int
ret
;
fade
->
class
=
&
fade_class
;
av_opt_set_defaults
(
fade
);
if
((
ret
=
av_opt_set_from_string
(
fade
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
fade
->
fade_per_frame
=
(
1
<<
16
)
/
fade
->
nb_frames
;
if
(
!
strcmp
(
fade
->
type
,
"in"
))
...
...
@@ -106,13 +98,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
return
0
;
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
FadeContext
*
fade
=
ctx
->
priv
;
av_opt_free
(
fade
);
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
{
static
const
enum
AVPixelFormat
pix_fmts
[]
=
{
...
...
@@ -247,15 +232,17 @@ static const AVFilterPad avfilter_vf_fade_outputs[] = {
{
NULL
}
};
static
const
char
*
const
shorthand
[]
=
{
"type"
,
"start_frame"
,
"nb_frames"
,
NULL
};
AVFilter
avfilter_vf_fade
=
{
.
name
=
"fade"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Fade in/out input video."
),
.
init
=
init
,
.
uninit
=
uninit
,
.
priv_size
=
sizeof
(
FadeContext
),
.
query_formats
=
query_formats
,
.
inputs
=
avfilter_vf_fade_inputs
,
.
outputs
=
avfilter_vf_fade_outputs
,
.
priv_class
=
&
fade_class
,
.
shorthand
=
shorthand
,
};
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