From da79a214efa2a8c94ff76aa60f678be12f9dfa3e Mon Sep 17 00:00:00 2001 From: Dougall Johnson Date: Mon, 21 Oct 2019 20:39:31 +1100 Subject: [PATCH] stb_vorbis: improve fix for theoretical seek performance problem --- stb_vorbis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_vorbis.c b/stb_vorbis.c index 1c8d2ac..65fc9b7 100644 --- a/stb_vorbis.c +++ b/stb_vorbis.c @@ -4721,7 +4721,7 @@ static int seek_to_sample_coarse(stb_vorbis *f, uint32 sample_number) // if we've just found the last page again then we're in a tricky file, // and we're close enough (if it wasn't an interpolation probe). if (mid.page_start == right.page_start) { - if (probe >= 2) + if (probe >= 2 || delta <= 65536) break; } else { if (last_sample_limit < mid.last_decoded_sample)