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
392ec7ec
Commit
392ec7ec
authored
Mar 16, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/vf_pad: use standard options parsing.
parent
b201c167
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
vf_pad.c
libavfilter/vf_pad.c
+3
-15
No files found.
libavfilter/vf_pad.c
View file @
392ec7ec
...
@@ -111,14 +111,6 @@ AVFILTER_DEFINE_CLASS(pad);
...
@@ -111,14 +111,6 @@ AVFILTER_DEFINE_CLASS(pad);
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
{
PadContext
*
pad
=
ctx
->
priv
;
PadContext
*
pad
=
ctx
->
priv
;
static
const
char
*
shorthand
[]
=
{
"width"
,
"height"
,
"x"
,
"y"
,
"color"
,
NULL
};
int
ret
;
pad
->
class
=
&
pad_class
;
av_opt_set_defaults
(
pad
);
if
((
ret
=
av_opt_set_from_string
(
pad
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
if
(
av_parse_color
(
pad
->
rgba_color
,
pad
->
color_str
,
-
1
,
ctx
)
<
0
)
if
(
av_parse_color
(
pad
->
rgba_color
,
pad
->
color_str
,
-
1
,
ctx
)
<
0
)
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
...
@@ -126,12 +118,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
...
@@ -126,12 +118,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
return
0
;
return
0
;
}
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
PadContext
*
pad
=
ctx
->
priv
;
av_opt_free
(
pad
);
}
static
int
config_input
(
AVFilterLink
*
inlink
)
static
int
config_input
(
AVFilterLink
*
inlink
)
{
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterContext
*
ctx
=
inlink
->
dst
;
...
@@ -416,17 +402,19 @@ static const AVFilterPad avfilter_vf_pad_outputs[] = {
...
@@ -416,17 +402,19 @@ static const AVFilterPad avfilter_vf_pad_outputs[] = {
{
NULL
}
{
NULL
}
};
};
static
const
char
*
const
shorthand
[]
=
{
"width"
,
"height"
,
"x"
,
"y"
,
"color"
,
NULL
};
AVFilter
avfilter_vf_pad
=
{
AVFilter
avfilter_vf_pad
=
{
.
name
=
"pad"
,
.
name
=
"pad"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black)."
),
.
description
=
NULL_IF_CONFIG_SMALL
(
"Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black)."
),
.
priv_size
=
sizeof
(
PadContext
),
.
priv_size
=
sizeof
(
PadContext
),
.
init
=
init
,
.
init
=
init
,
.
uninit
=
uninit
,
.
query_formats
=
query_formats
,
.
query_formats
=
query_formats
,
.
inputs
=
avfilter_vf_pad_inputs
,
.
inputs
=
avfilter_vf_pad_inputs
,
.
outputs
=
avfilter_vf_pad_outputs
,
.
outputs
=
avfilter_vf_pad_outputs
,
.
priv_class
=
&
pad_class
,
.
priv_class
=
&
pad_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