From 5f25af9dbd632999956198588b03714f4c3632ca Mon Sep 17 00:00:00 2001 From: Alexandre Bique Date: Sat, 17 Feb 2024 22:07:22 +0100 Subject: [PATCH] flac: Fix binary-search range check for seek (#262) --- symphonia-bundle-flac/src/demuxer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/symphonia-bundle-flac/src/demuxer.rs b/symphonia-bundle-flac/src/demuxer.rs index 2ae595f9..74dbc166 100644 --- a/symphonia-bundle-flac/src/demuxer.rs +++ b/symphonia-bundle-flac/src/demuxer.rs @@ -266,7 +266,7 @@ impl FormatReader for FlacReader { if ts < sync.ts { end_byte_offset = mid_byte_offset; } - else if ts > sync.ts && ts < sync.ts + sync.dur { + else if ts >= sync.ts && ts < sync.ts + sync.dur { debug!("seeked to ts={} (delta={})", sync.ts, sync.ts as i64 - ts as i64); return Ok(SeekedTo { track_id: 0, actual_ts: sync.ts, required_ts: ts });