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
6202cf5d
Commit
6202cf5d
authored
Mar 16, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/vf_crop: use standard options parsing.
parent
e9ca55ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
vf_crop.c
libavfilter/vf_crop.c
+3
-13
No files found.
libavfilter/vf_crop.c
View file @
6202cf5d
...
...
@@ -107,24 +107,12 @@ static const AVOption crop_options[] = {
AVFILTER_DEFINE_CLASS
(
crop
);
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
CropContext
*
crop
=
ctx
->
priv
;
static
const
char
*
shorthand
[]
=
{
"w"
,
"h"
,
"x"
,
"y"
,
"keep_aspect"
,
NULL
};
crop
->
class
=
&
crop_class
;
av_opt_set_defaults
(
crop
);
return
av_opt_set_from_string
(
crop
,
args
,
shorthand
,
"="
,
":"
);
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
CropContext
*
crop
=
ctx
->
priv
;
av_expr_free
(
crop
->
x_pexpr
);
crop
->
x_pexpr
=
NULL
;
av_expr_free
(
crop
->
y_pexpr
);
crop
->
y_pexpr
=
NULL
;
av_opt_free
(
crop
);
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
...
...
@@ -348,6 +336,8 @@ static const AVFilterPad avfilter_vf_crop_outputs[] = {
{
NULL
}
};
static
const
char
*
const
shorthand
[]
=
{
"w"
,
"h"
,
"x"
,
"y"
,
"keep_aspect"
,
NULL
};
AVFilter
avfilter_vf_crop
=
{
.
name
=
"crop"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Crop the input video to width:height:x:y."
),
...
...
@@ -355,10 +345,10 @@ AVFilter avfilter_vf_crop = {
.
priv_size
=
sizeof
(
CropContext
),
.
query_formats
=
query_formats
,
.
init
=
init
,
.
uninit
=
uninit
,
.
inputs
=
avfilter_vf_crop_inputs
,
.
outputs
=
avfilter_vf_crop_outputs
,
.
priv_class
=
&
crop_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