osc.lua: ignore seek ranges without usable duration

seekRangesF() accepts a zero duration and produces NaN/Inf coordinates,
which assdraw cannot format. Ignore seek-range metadata when the native
duration property is unavailable or zero.

Fixes #18344
This commit is contained in:
subotac authored and sfan5 committed 2026-08-07 22:41:57 +02:00
1 parent 21277b0ccf
commit dd5d17d328
1 file changed
+1 -1
+1 -1
View File
@@ -2533,7 +2533,7 @@ local function osc_init()
if user_opts.seekrangestyle == "none" or not cache_enabled() then
return nil
end
if state.duration == nil then
if state.duration == nil or state.duration == 0 then
return nil
end
local nranges = {}