mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 14:14:21 +00:00
Fix mp3 decoder bug: only reset offset after new frame
This commit is contained in:
parent
6e2c022b5d
commit
ce00eb0de6
1 changed files with 1 additions and 1 deletions
|
@ -64,11 +64,11 @@ where
|
|||
#[inline]
|
||||
fn next(&mut self) -> Option<i16> {
|
||||
if self.current_frame_offset == self.current_frame.data.len() {
|
||||
self.current_frame_offset = 0;
|
||||
match self.decoder.next_frame() {
|
||||
Ok(frame) => self.current_frame = frame,
|
||||
_ => return None,
|
||||
}
|
||||
self.current_frame_offset = 0;
|
||||
}
|
||||
|
||||
let v = self.current_frame.data[self.current_frame_offset];
|
||||
|
|
Loading…
Reference in a new issue