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
b13623e1
Commit
b13623e1
authored
Feb 25, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
af_volume: switch to an AVOptions-based system.
parent
dd7fc37c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
af_volume.c
libavfilter/af_volume.c
+2
-11
No files found.
libavfilter/af_volume.c
View file @
b13623e1
...
...
@@ -63,15 +63,6 @@ static const AVClass volume_class = {
static
av_cold
int
init
(
AVFilterContext
*
ctx
,
const
char
*
args
)
{
VolumeContext
*
vol
=
ctx
->
priv
;
int
ret
;
vol
->
class
=
&
volume_class
;
av_opt_set_defaults
(
vol
);
if
((
ret
=
av_set_options_string
(
vol
,
args
,
"="
,
":"
))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing options string '%s'.
\n
"
,
args
);
return
ret
;
}
if
(
vol
->
precision
==
PRECISION_FIXED
)
{
vol
->
volume_i
=
(
int
)(
vol
->
volume
*
256
+
0
.
5
);
...
...
@@ -84,8 +75,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
)
...
...
@@ -311,6 +301,7 @@ AVFilter avfilter_af_volume = {
.
description
=
NULL_IF_CONFIG_SMALL
(
"Change input volume."
),
.
query_formats
=
query_formats
,
.
priv_size
=
sizeof
(
VolumeContext
),
.
priv_class
=
&
volume_class
,
.
init
=
init
,
.
inputs
=
avfilter_af_volume_inputs
,
.
outputs
=
avfilter_af_volume_outputs
,
...
...
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