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
e9ca55ae
Commit
e9ca55ae
authored
Mar 16, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/af_volume: use standard options parsing.
parent
e9f45a83
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
af_volume.c
libavfilter/af_volume.c
+4
-10
No files found.
libavfilter/af_volume.c
View file @
e9ca55ae
...
...
@@ -59,14 +59,6 @@ AVFILTER_DEFINE_CLASS(volume);
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
VolumeContext
*
vol
=
ctx
->
priv
;
static
const
char
*
shorthand
[]
=
{
"volume"
,
"precision"
,
NULL
};
int
ret
;
vol
->
class
=
&
volume_class
;
av_opt_set_defaults
(
vol
);
if
((
ret
=
av_opt_set_from_string
(
vol
,
args
,
shorthand
,
"="
,
":"
))
<
0
)
return
ret
;
if
(
vol
->
precision
==
PRECISION_FIXED
)
{
vol
->
volume_i
=
(
int
)(
vol
->
volume
*
256
+
0
.
5
);
...
...
@@ -79,8 +71,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
precision_str
[
vol
->
precision
]);
}
av_opt_free
(
vol
);
return
ret
;
return
0
;
}
static
int
query_formats
(
AVFilterContext
*
ctx
)
...
...
@@ -299,6 +290,8 @@ static const AVFilterPad avfilter_af_volume_outputs[] = {
{
NULL
}
};
static
const
char
*
const
shorthand
[]
=
{
"volume"
,
"precision"
,
NULL
};
AVFilter
avfilter_af_volume
=
{
.
name
=
"volume"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Change input volume."
),
...
...
@@ -308,4 +301,5 @@ AVFilter avfilter_af_volume = {
.
inputs
=
avfilter_af_volume_inputs
,
.
outputs
=
avfilter_af_volume_outputs
,
.
priv_class
=
&
volume_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