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
Xiph.Org
flac
Commits
e167984d
Commit
e167984d
authored
Dec 17, 2002
by
Josh Coalson
Browse files
fix bug in aiff code for skipping ahead
parent
1106d5f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/flac/encode.c
View file @
e167984d
...
...
@@ -295,7 +295,7 @@ flac__encode_aif(FILE *infile, long infilesize, const char *infilename, const ch
}
data_bytes
=
xx
;
pad
=
(
data_bytes
&
1U
)
?
true
:
false
;
data_bytes
-=
8U
;
data_bytes
-=
8U
;
/* discount the offset and block size fields */
/* offset */
if
(
!
read_big_endian_uint32
(
infile
,
&
xx
,
false
,
encoder_session
.
inbasefilename
))
...
...
@@ -333,7 +333,7 @@ flac__encode_aif(FILE *infile, long infilesize, const char *infilename, const ch
/* do 1<<30 bytes at a time, since 1<<30 is a nice round number, and */
/* is guaranteed to be less than LONG_MAX */
for
(;
remaining
>
0U
;
remaining
-=
remaining
>
(
1U
<<
30
)
?
remaining
:
(
1U
<<
30
)
)
while
(
remaining
>
0U
)
{
unsigned
long
skip
=
(
unsigned
long
)(
remaining
%
(
1U
<<
30
));
...
...
@@ -346,6 +346,8 @@ flac__encode_aif(FILE *infile, long infilesize, const char *infilename, const ch
}
skip
-=
need
;
}
remaining
-=
skip
;
}
}
...
...
@@ -431,7 +433,7 @@ flac__encode_aif(FILE *infile, long infilesize, const char *infilename, const ch
/* do 1<<30 bytes at a time, since 1<<30 is a nice round number, and */
/* is guaranteed to be less than LONG_MAX */
for
(;
remaining
>
0U
;
remaining
-=
remaining
>
(
1U
<<
30
)
?
remaining
:
(
1U
<<
30
)
)
while
(
remaining
>
0U
)
{
unsigned
long
skip
=
(
unsigned
long
)(
remaining
%
(
1U
<<
30
));
...
...
@@ -444,6 +446,8 @@ flac__encode_aif(FILE *infile, long infilesize, const char *infilename, const ch
}
skip
-=
need
;
}
remaining
-=
skip
;
}
}
...
...
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