Skip to content

osc.lua: ignore seek ranges without positive duration - #18349

Merged
sfan5 merged 1 commit into
mpv-player:masterfrom
subotac:fix/osc-zero-duration-seek-ranges
Aug 7, 2026
Merged

sfan5 merged 1 commit into
mpv-player:masterfrom
subotac:fix/osc-zero-duration-seek-ranges

Conversation

@subotac

@subotac subotac commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

seekRangesF() currently accepts a zero duration and produces NaN/Inf
coordinates, which assdraw cannot format. Restoree the positive-duration
guard so invalid seek-range metadata is ignored

Tested with Lua 5.1 and 5.2 syntax checks and the full Lua lint suite.

Fixes #18344

Comment thread player/lua/osc.lua Outdated
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 mpv-player#18344
@subotac
subotac force-pushed the fix/osc-zero-duration-seek-ranges branch from a56a5d5 to 3165c2a Compare August 7, 2026 17:36
@sfan5
sfan5 merged commit dd5d17d into mpv-player:master Aug 7, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

osc.lua: bad argument #3 to 'format' (not a number in proper range)

3 participants