From 8f77aa84e66490279bb32ad607205298831744ff Mon Sep 17 00:00:00 2001 From: Be Date: Sun, 23 Jan 2022 14:59:38 -0600 Subject: [PATCH] fix returning garbage audio from cache after EOF Once the end of the file is reached, the EndOfFile error should be returned indefinitely until a seek is done. --- core/src/read/read_stream.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/src/read/read_stream.rs b/core/src/read/read_stream.rs index 6bacbc0..dd51139 100644 --- a/core/src/read/read_stream.rs +++ b/core/src/read/read_stream.rs @@ -751,8 +751,6 @@ impl ReadDiskStream { // 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;