mirror of
https://github.com/RustAudio/rodio
synced 2024-11-10 06:04:16 +00:00
always seek to start in mp3::is_mp3() (#424)
This commit is contained in:
parent
69a7f416a7
commit
55d957f8b4
1 changed files with 3 additions and 5 deletions
|
@ -91,10 +91,8 @@ where
|
|||
{
|
||||
let stream_pos = data.seek(SeekFrom::Current(0)).unwrap();
|
||||
let mut decoder = Decoder::new(data.by_ref());
|
||||
if decoder.next_frame().is_err() {
|
||||
data.seek(SeekFrom::Start(stream_pos)).unwrap();
|
||||
return false;
|
||||
}
|
||||
let ok = decoder.next_frame().is_ok();
|
||||
data.seek(SeekFrom::Start(stream_pos)).unwrap();
|
||||
|
||||
true
|
||||
ok
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue