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
Stefan Strogin
flac
Commits
530514ac
Commit
530514ac
authored
Jul 27, 2004
by
Josh Coalson
Browse files
fix bug skipping padding byte in unsupported WAVE subchunks
parent
83dd4ce7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/flac/encode.c
View file @
530514ac
...
...
@@ -894,11 +894,11 @@ int flac__encode_wav(FILE *infile, long infilesize, const char *infilename, cons
unsigned
long
skip
=
xx
+
(
xx
&
1U
);
FLAC__ASSERT
(
skip
<=
LONG_MAX
);
if
(
fseek
(
infile
,
xx
,
SEEK_CUR
)
<
0
)
{
if
(
fseek
(
infile
,
skip
,
SEEK_CUR
)
<
0
)
{
/* can't seek input, read ahead manually... */
unsigned
left
,
need
;
const
unsigned
chunk
=
sizeof
(
ucbuffer_
);
for
(
left
=
xx
;
left
>
0
;
)
{
for
(
left
=
skip
;
left
>
0
;
)
{
need
=
min
(
left
,
chunk
);
if
(
fread
(
ucbuffer_
,
1
,
need
,
infile
)
<
need
)
{
flac__utils_printf
(
stderr
,
1
,
"%s: ERROR during read while skipping unsupported sub-chunk
\n
"
,
encoder_session
.
inbasefilename
);
...
...
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