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
6e29f392
Commit
6e29f392
authored
Apr 15, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr/rematrix: use av_calloc()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8a11114a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
rematrix.c
libswresample/rematrix.c
+3
-3
No files found.
libswresample/rematrix.c
View file @
6e29f392
...
...
@@ -337,7 +337,7 @@ av_cold int swri_rematrix_init(SwrContext *s){
return
r
;
}
if
(
s
->
midbuf
.
fmt
==
AV_SAMPLE_FMT_S16P
){
s
->
native_matrix
=
av_
mallocz
(
nb_in
*
nb_out
*
sizeof
(
int
));
s
->
native_matrix
=
av_
calloc
(
nb_in
*
nb_out
,
sizeof
(
int
));
s
->
native_one
=
av_mallocz
(
sizeof
(
int
));
for
(
i
=
0
;
i
<
nb_out
;
i
++
)
for
(
j
=
0
;
j
<
nb_in
;
j
++
)
...
...
@@ -347,7 +347,7 @@ av_cold int swri_rematrix_init(SwrContext *s){
s
->
mix_2_1_f
=
(
mix_2_1_func_type
*
)
sum2_s16
;
s
->
mix_any_f
=
(
mix_any_func_type
*
)
get_mix_any_func_s16
(
s
);
}
else
if
(
s
->
midbuf
.
fmt
==
AV_SAMPLE_FMT_FLTP
){
s
->
native_matrix
=
av_
mallocz
(
nb_in
*
nb_out
*
sizeof
(
float
));
s
->
native_matrix
=
av_
calloc
(
nb_in
*
nb_out
,
sizeof
(
float
));
s
->
native_one
=
av_mallocz
(
sizeof
(
float
));
for
(
i
=
0
;
i
<
nb_out
;
i
++
)
for
(
j
=
0
;
j
<
nb_in
;
j
++
)
...
...
@@ -357,7 +357,7 @@ av_cold int swri_rematrix_init(SwrContext *s){
s
->
mix_2_1_f
=
(
mix_2_1_func_type
*
)
sum2_float
;
s
->
mix_any_f
=
(
mix_any_func_type
*
)
get_mix_any_func_float
(
s
);
}
else
if
(
s
->
midbuf
.
fmt
==
AV_SAMPLE_FMT_DBLP
){
s
->
native_matrix
=
av_
mallocz
(
nb_in
*
nb_out
*
sizeof
(
double
));
s
->
native_matrix
=
av_
calloc
(
nb_in
*
nb_out
,
sizeof
(
double
));
s
->
native_one
=
av_mallocz
(
sizeof
(
double
));
for
(
i
=
0
;
i
<
nb_out
;
i
++
)
for
(
j
=
0
;
j
<
nb_in
;
j
++
)
...
...
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