Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
flac
Commits
b2109495
Commit
b2109495
authored
Mar 01, 2001
by
Josh Coalson
Browse files
fix decode buffer size
parent
22c8ad82
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/flac/decode.c
View file @
b2109495
...
...
@@ -306,7 +306,8 @@ FLAC__StreamDecoderWriteStatus write_callback(const FLAC__FileDecoder *decoder,
bool
is_big_endian
=
(
stream_info
->
is_wave_out
?
false
:
stream_info
->
is_big_endian
);
bool
is_unsigned_samples
=
(
stream_info
->
is_wave_out
?
bps
<=
8
:
stream_info
->
is_unsigned_samples
);
unsigned
wide_samples
=
frame
->
header
.
blocksize
,
wide_sample
,
sample
,
channel
,
byte
;
static
int8
s8buffer
[
FLAC__MAX_BLOCK_SIZE
*
FLAC__MAX_CHANNELS
*
((
FLAC__MAX_BITS_PER_SAMPLE
+
7
)
>>
3
)];
/* WATCHOUT: can be up to 2 megs */
static
int8
s8buffer
[
FLAC__MAX_BLOCK_SIZE
*
FLAC__MAX_CHANNELS
*
sizeof
(
int32
)];
/* WATCHOUT: can be up to 2 megs */
/* WATCHOUT: we say 'sizeof(int32)' above instead of '(FLAC__MAX_BITS_PER_SAMPLE+7)/8' because we have to use an array int32 even for 24 bps */
uint8
*
u8buffer
=
(
uint8
*
)
s8buffer
;
int16
*
s16buffer
=
(
int16
*
)
s8buffer
;
uint16
*
u16buffer
=
(
uint16
*
)
s8buffer
;
...
...
Write
Preview
Supports
Markdown
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