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
51b356ee
Commit
51b356ee
authored
Dec 31, 2018
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_sofalizer: stop allocating never used buffers
parent
86555a2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
af_sofalizer.c
libavfilter/af_sofalizer.c
+11
-3
No files found.
libavfilter/af_sofalizer.c
View file @
51b356ee
...
...
@@ -719,12 +719,20 @@ static int load_data(AVFilterContext *ctx, int azim, int elev, float radius, int
n_samples
=
s
->
sofa
.
n_samples
;
ir_samples
=
s
->
sofa
.
ir_samples
;
s
->
data_ir
[
0
]
=
av_calloc
(
n_samples
,
sizeof
(
float
)
*
s
->
n_conv
);
s
->
data_ir
[
1
]
=
av_calloc
(
n_samples
,
sizeof
(
float
)
*
s
->
n_conv
);
if
(
s
->
type
==
TIME_DOMAIN
)
{
s
->
data_ir
[
0
]
=
av_calloc
(
n_samples
,
sizeof
(
float
)
*
s
->
n_conv
);
s
->
data_ir
[
1
]
=
av_calloc
(
n_samples
,
sizeof
(
float
)
*
s
->
n_conv
);
if
(
!
s
->
data_ir
[
0
]
||
!
s
->
data_ir
[
1
])
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
}
s
->
delay
[
0
]
=
av_calloc
(
s
->
n_conv
,
sizeof
(
int
));
s
->
delay
[
1
]
=
av_calloc
(
s
->
n_conv
,
sizeof
(
int
));
if
(
!
s
->
d
ata_ir
[
0
]
||
!
s
->
data_ir
[
1
]
||
!
s
->
d
elay
[
0
]
||
!
s
->
delay
[
1
])
{
if
(
!
s
->
delay
[
0
]
||
!
s
->
delay
[
1
])
{
ret
=
AVERROR
(
ENOMEM
);
goto
fail
;
}
...
...
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