Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Strogin
flac
Commits
9be32a53
Commit
9be32a53
authored
Sep 04, 2015
by
Erik de Castro Lopo
Browse files
flac/decode.c: Fix undefined behaviour
parent
4591b3f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/flac/decode.c
View file @
9be32a53
...
...
@@ -1135,7 +1135,7 @@ FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder
if
(
shift
&&
!
decoder_session
->
replaygain
.
apply
)
{
for
(
wide_sample
=
0
;
wide_sample
<
wide_samples
;
wide_sample
++
)
for
(
channel
=
0
;
channel
<
channels
;
channel
++
)
((
FLAC__
int32
**
)
buffer
)[
channel
][
wide_sample
]
<<=
shift
;
/*@@@@@@un-const'ing the buffer is hacky but safe*/
((
u
int32
_t
**
)
buffer
)[
channel
][
wide_sample
]
<<=
shift
;
/*@@@@@@un-const'ing the buffer is hacky but safe*/
}
if
(
decoder_session
->
replaygain
.
apply
)
{
bytes_to_write
=
FLAC__replaygain_synthesis__apply_gain
(
...
...
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