Skip to content

Commit

Permalink
fix returning garbage audio from cache after EOF
Browse files Browse the repository at this point in the history
Once the end of the file is reached, the EndOfFile error should be
returned indefinitely until a seek is done.
  • Loading branch information
Be-ing authored and obsoleszenz committed Jun 10, 2022
1 parent c3eaa0e commit 8f77aa8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions core/src/read/read_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,6 @@ impl<D: Decoder> ReadDiskStream<D> {

// Check if the end of the file was reached.
if self.playhead() >= self.file_info.num_frames {
self.current_block_start_frame = 0;
self.current_frame_in_block = 0;
return Err(ReadError::EndOfFile);
}
let mut reached_end_of_file = false;
Expand Down

0 comments on commit 8f77aa8

Please sign in to comment.