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
10a68ccd
Commit
10a68ccd
authored
Apr 14, 2020
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_amix: use av_strtod() for weights
parent
ce24b1de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
af_amix.c
libavfilter/af_amix.c
+7
-6
No files found.
libavfilter/af_amix.c
View file @
10a68ccd
...
...
@@ -34,6 +34,7 @@
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/eval.h"
#include "libavutil/float_dsp.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
...
...
@@ -506,9 +507,9 @@ static int activate(AVFilterContext *ctx)
static
av_cold
int
init
(
AVFilterContext
*
ctx
)
{
MixContext
*
s
=
ctx
->
priv
;
char
*
p
,
*
arg
,
*
saveptr
=
NULL
;
float
last_weight
=
1
.
f
;
int
i
,
ret
;
char
*
p
;
for
(
i
=
0
;
i
<
s
->
nb_inputs
;
i
++
)
{
AVFilterPad
pad
=
{
0
};
...
...
@@ -534,13 +535,13 @@ static av_cold int init(AVFilterContext *ctx)
p
=
s
->
weights_str
;
for
(
i
=
0
;
i
<
s
->
nb_inputs
;
i
++
)
{
if
(
!
(
arg
=
av_strtok
(
p
,
" "
,
&
saveptr
)))
break
;
p
=
NULL
;
sscanf
(
arg
,
"%f"
,
&
last_weight
);
last_weight
=
av_strtod
(
p
,
&
p
);
s
->
weights
[
i
]
=
last_weight
;
s
->
weight_sum
+=
FFABS
(
last_weight
);
if
(
p
&&
*
p
)
p
++
;
else
break
;
}
for
(;
i
<
s
->
nb_inputs
;
i
++
)
{
...
...
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