mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-09-20 14:21:57 +00:00
MP3: Fix infinite loop
This commit is contained in:
parent
5b9b97784a
commit
3788a436af
1 changed files with 1 additions and 4 deletions
|
@ -54,10 +54,7 @@ pub(super) fn rev_search_for_frame_sync<R>(input: &mut R) -> std::io::Result<Opt
|
|||
where
|
||||
R: Read + Seek,
|
||||
{
|
||||
let res = input.seek(SeekFrom::Current(REV_FRAME_SEARCH_BOUNDS.neg()));
|
||||
if res.is_err() {
|
||||
return Ok(None);
|
||||
}
|
||||
input.seek(SeekFrom::Current(REV_FRAME_SEARCH_BOUNDS.neg()))?;
|
||||
|
||||
let ret = search_for_frame_sync(&mut input.take(REV_FRAME_SEARCH_BOUNDS as u64));
|
||||
if let Ok(Some(_)) = ret {
|
||||
|
|
Loading…
Reference in a new issue