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;
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;
}
}
/* 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 */