Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flac
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Strogin
flac
Commits
a47e20f0
Commit
a47e20f0
authored
Jan 26, 2005
by
Josh Coalson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix another seeking bug that can happen rarely when seeking past the end of the stream
parent
65dc12a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/libFLAC/seekable_stream_decoder.c
src/libFLAC/seekable_stream_decoder.c
+4
-3
No files found.
src/libFLAC/seekable_stream_decoder.c
View file @
a47e20f0
...
...
@@ -744,7 +744,7 @@ FLAC__StreamDecoderReadStatus read_callback_(const FLAC__StreamDecoder *decoder,
if
(
seekable_stream_decoder
->
private_
->
eof_callback
(
seekable_stream_decoder
,
seekable_stream_decoder
->
private_
->
client_data
))
{
*
bytes
=
0
;
#if 0
@@@@@@ verify that this is not needed
/*@@@@@@ verify that this is not needed */
seekable_stream_decoder->protected_->state = FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM;
#endif
return
FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM
;
...
...
@@ -757,7 +757,7 @@ FLAC__StreamDecoderReadStatus read_callback_(const FLAC__StreamDecoder *decoder,
if
(
*
bytes
==
0
)
{
if
(
seekable_stream_decoder
->
private_
->
eof_callback
(
seekable_stream_decoder
,
seekable_stream_decoder
->
private_
->
client_data
))
{
#if 0
@@@@@@ verify that this is not needed
/*@@@@@@ verify that this is not needed */
seekable_stream_decoder->protected_->state = FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM;
#endif
return
FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM
;
...
...
@@ -1062,7 +1062,8 @@ FLAC__bool seek_to_absolute_sample_(FLAC__SeekableStreamDecoder *decoder, FLAC__
}
}
/* our write callback will change the state when it gets to the target frame */
if
(
decoder
->
protected_
->
state
!=
FLAC__SEEKABLE_STREAM_DECODER_SEEKING
)
{
/* actually, we could have got_a_frame if our decoder is at FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM so we need to check for that also */
if
(
decoder
->
protected_
->
state
!=
FLAC__SEEKABLE_STREAM_DECODER_SEEKING
&&
decoder
->
protected_
->
state
!=
FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM
)
{
break
;
}
else
{
/* we need to narrow the search */
...
...
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