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
b3c6e89d
Commit
b3c6e89d
authored
Aug 18, 2016
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/avf_showspectrum: do not use uninitialized memory
parent
703ae350
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
avf_showspectrum.c
libavfilter/avf_showspectrum.c
+2
-3
No files found.
libavfilter/avf_showspectrum.c
View file @
b3c6e89d
...
...
@@ -380,7 +380,7 @@ static int config_output(AVFilterLink *outlink)
if
(
!
s
->
color_buffer
)
return
AVERROR
(
ENOMEM
);
for
(
i
=
0
;
i
<
s
->
nb_display_channels
;
i
++
)
{
s
->
color_buffer
[
i
]
=
av_
malloc_array
(
s
->
orientation
==
VERTICAL
?
s
->
h
*
3
:
s
->
w
*
3
,
sizeof
(
**
s
->
color_buffer
));
s
->
color_buffer
[
i
]
=
av_
calloc
(
s
->
orientation
==
VERTICAL
?
s
->
h
*
3
:
s
->
w
*
3
,
sizeof
(
**
s
->
color_buffer
));
if
(
!
s
->
color_buffer
[
i
])
return
AVERROR
(
ENOMEM
);
}
...
...
@@ -730,8 +730,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
ctx
->
internal
->
execute
(
ctx
,
plot_channel
,
NULL
,
NULL
,
s
->
nb_display_channels
);
for
(
y
=
0
;
y
<
z
*
3
;
y
++
)
{
s
->
combine_buffer
[
y
]
+=
s
->
color_buffer
[
0
][
y
];
for
(
x
=
1
;
x
<
s
->
nb_display_channels
;
x
++
)
{
for
(
x
=
0
;
x
<
s
->
nb_display_channels
;
x
++
)
{
s
->
combine_buffer
[
y
]
+=
s
->
color_buffer
[
x
][
y
];
}
}
...
...
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