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
1edbeb35
Commit
1edbeb35
authored
Mar 15, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/ebur128: check histogram allocations.
parent
db670e53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
f_ebur128.c
libavfilter/f_ebur128.c
+4
-0
No files found.
libavfilter/f_ebur128.c
View file @
1edbeb35
...
...
@@ -373,6 +373,8 @@ static struct hist_entry *get_histogram(void)
int
i
;
struct
hist_entry
*
h
=
av_calloc
(
HIST_SIZE
,
sizeof
(
*
h
));
if
(
!
h
)
return
NULL
;
for
(
i
=
0
;
i
<
HIST_SIZE
;
i
++
)
{
h
[
i
].
loudness
=
i
/
(
double
)
HIST_GRAIN
+
ABS_THRES
;
h
[
i
].
energy
=
ENERGY
(
h
[
i
].
loudness
);
...
...
@@ -406,6 +408,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
ebur128
->
i400
.
histogram
=
get_histogram
();
ebur128
->
i3000
.
histogram
=
get_histogram
();
if
(
!
ebur128
->
i400
.
histogram
||
!
ebur128
->
i3000
.
histogram
)
return
AVERROR
(
ENOMEM
);
ebur128
->
integrated_loudness
=
ABS_THRES
;
ebur128
->
loudness_range
=
0
;
...
...
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