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
40ddbc87
Commit
40ddbc87
authored
Aug 06, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avf_showspectrum: use av_calloc()
parent
cb5190bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
avf_showspectrum.c
libavfilter/avf_showspectrum.c
+2
-9
No files found.
libavfilter/avf_showspectrum.c
View file @
40ddbc87
...
...
@@ -172,7 +172,6 @@ static int config_output(AVFilterLink *outlink)
/* (re-)configuration if the video output changed (or first init) */
if
(
rdft_bits
!=
s
->
rdft_bits
)
{
size_t
rdft_size
,
rdft_listsize
;
AVFrame
*
outpicref
;
av_rdft_end
(
s
->
rdft
);
...
...
@@ -192,17 +191,11 @@ static int config_output(AVFilterLink *outlink)
av_freep
(
&
s
->
rdft_data
);
s
->
nb_display_channels
=
inlink
->
channels
;
if
(
av_size_mult
(
sizeof
(
*
s
->
rdft_data
),
s
->
nb_display_channels
,
&
rdft_listsize
)
<
0
)
return
AVERROR
(
EINVAL
);
if
(
av_size_mult
(
sizeof
(
**
s
->
rdft_data
),
win_size
,
&
rdft_size
)
<
0
)
return
AVERROR
(
EINVAL
);
s
->
rdft_data
=
av_malloc
(
rdft_listsize
);
s
->
rdft_data
=
av_calloc
(
s
->
nb_display_channels
,
sizeof
(
*
s
->
rdft_data
));
if
(
!
s
->
rdft_data
)
return
AVERROR
(
ENOMEM
);
for
(
i
=
0
;
i
<
s
->
nb_display_channels
;
i
++
)
{
s
->
rdft_data
[
i
]
=
av_
malloc
(
rdft_size
);
s
->
rdft_data
[
i
]
=
av_
calloc
(
win_size
,
sizeof
(
**
s
->
rdft_data
)
);
if
(
!
s
->
rdft_data
[
i
])
return
AVERROR
(
ENOMEM
);
}
...
...
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