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
7caf381a
Commit
7caf381a
authored
Dec 19, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_dynaudnorm: use av_malloc_array()
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
b92b4775
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
af_dynaudnorm.c
libavfilter/af_dynaudnorm.c
+5
-5
No files found.
libavfilter/af_dynaudnorm.c
View file @
7caf381a
...
...
@@ -162,7 +162,7 @@ static cqueue *cqueue_create(int size)
q
->
nb_elements
=
0
;
q
->
first
=
0
;
q
->
elements
=
av_malloc
(
sizeof
(
double
)
*
size
);
q
->
elements
=
av_malloc
_array
(
size
,
sizeof
(
double
)
);
if
(
!
q
->
elements
)
{
av_free
(
q
);
return
NULL
;
...
...
@@ -266,16 +266,16 @@ static int config_input(AVFilterLink *inlink)
inlink
->
partial_buf_size
=
frame_size
(
inlink
->
sample_rate
,
s
->
frame_len_msec
);
av_log
(
ctx
,
AV_LOG_DEBUG
,
"frame len %d
\n
"
,
s
->
frame_len
);
s
->
fade_factors
[
0
]
=
av_malloc
(
s
->
frame_len
*
sizeof
(
*
s
->
fade_factors
[
0
]));
s
->
fade_factors
[
1
]
=
av_malloc
(
s
->
frame_len
*
sizeof
(
*
s
->
fade_factors
[
1
]));
s
->
fade_factors
[
0
]
=
av_malloc
_array
(
s
->
frame_len
,
sizeof
(
*
s
->
fade_factors
[
0
]));
s
->
fade_factors
[
1
]
=
av_malloc
_array
(
s
->
frame_len
,
sizeof
(
*
s
->
fade_factors
[
1
]));
s
->
prev_amplification_factor
=
av_malloc
(
inlink
->
channels
*
sizeof
(
*
s
->
prev_amplification_factor
));
s
->
prev_amplification_factor
=
av_malloc
_array
(
inlink
->
channels
,
sizeof
(
*
s
->
prev_amplification_factor
));
s
->
dc_correction_value
=
av_calloc
(
inlink
->
channels
,
sizeof
(
*
s
->
dc_correction_value
));
s
->
compress_threshold
=
av_calloc
(
inlink
->
channels
,
sizeof
(
*
s
->
compress_threshold
));
s
->
gain_history_original
=
av_calloc
(
inlink
->
channels
,
sizeof
(
*
s
->
gain_history_original
));
s
->
gain_history_minimum
=
av_calloc
(
inlink
->
channels
,
sizeof
(
*
s
->
gain_history_minimum
));
s
->
gain_history_smoothed
=
av_calloc
(
inlink
->
channels
,
sizeof
(
*
s
->
gain_history_smoothed
));
s
->
weights
=
av_malloc
(
s
->
filter_size
*
sizeof
(
*
s
->
weights
));
s
->
weights
=
av_malloc
_array
(
s
->
filter_size
,
sizeof
(
*
s
->
weights
));
if
(
!
s
->
prev_amplification_factor
||
!
s
->
dc_correction_value
||
!
s
->
compress_threshold
||
!
s
->
fade_factors
[
0
]
||
!
s
->
fade_factors
[
1
]
||
!
s
->
gain_history_original
||
!
s
->
gain_history_minimum
||
...
...
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