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
98ae6b0a
Commit
98ae6b0a
authored
Oct 16, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vafilter/af_replaygain: fix undefined behaviour
Fixes #8291
parent
71bceb06
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
af_replaygain.c
libavfilter/af_replaygain.c
+4
-4
No files found.
libavfilter/af_replaygain.c
View file @
98ae6b0a
...
...
@@ -551,7 +551,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterLink
*
outlink
=
ctx
->
outputs
[
0
];
ReplayGainContext
*
s
=
ctx
->
priv
;
uint32
_t
level
;
int64
_t
level
;
AVFrame
*
out
;
out
=
ff_get_audio_buffer
(
outlink
,
in
->
nb_samples
);
...
...
@@ -567,9 +567,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
out
->
nb_samples
);
butter_filter_stereo_samples
(
s
,
(
float
*
)
out
->
data
[
0
],
out
->
nb_samples
);
level
=
(
uint32_t
)
floor
(
100
*
calc_stereo_rms
((
float
*
)
out
->
data
[
0
],
out
->
nb_samples
));
level
=
av_clip
(
level
,
0
,
HISTOGRAM_SLOTS
-
1
);
level
=
lrint
(
floor
(
100
*
calc_stereo_rms
((
float
*
)
out
->
data
[
0
],
out
->
nb_samples
))
)
;
level
=
av_clip
64
(
level
,
0
,
HISTOGRAM_SLOTS
-
1
);
s
->
histogram
[
level
]
++
;
...
...
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