Skip to content

test: Allow for decode-ahead in the playing-seek media time bound - #1775

Merged
zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:fix/media-seek-decode-ahead
Oct 22, 2026
Merged

zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:fix/media-seek-decode-ahead

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1774

What and why

#1766 bounded playing_seek_between_keyframes' media time by "target + elapsed wall time + two frames". That's too tight on a fast runner: a playing source decodes ahead, so its reported time runs ahead of the frame it shows. macOS Tier 2 on #1773 (job 119759618532) saw first frame 135, media time 4666 ms, 97 ms after the seek; the limit was 4663 ms. Our regression from #1766.

The bound now keeps both allowances: elapsed time (a slow runner, the #1765 case) plus the 500 ms the test allowed before #1766 for running ahead (PLAYING_AHEAD_MS). The first-frame check and the lower bound are unchanged.

Test expectation change (maintainer sign-off): this widens one upper bound in our own test, from elapsed + 66 ms to elapsed + 500 ms.

RED → GREEN

Checklist

  • Base is master
  • I claimed the issue, or no one else has an open PR for it (test: playing_seek_between_keyframes too tight after #1766 (media time runs ahead while decoding) #1774)
  • Characterization test (if the unit had none), then RED, then GREEN commits (a focused CI fix, with RED from the CI log)
  • User-visible change: its line in docs/features.md is added or updated (not applicable: no user-visible change)
  • (Optional) Local gate passed and the pushed head is stamped; otherwise PR CI runs the full suite
  • Warning or flag changes (-W..., ratchets): none
  • Intentional differences from C listed in the parity test header and rust/README.md (ports): not a port

obs-rust#1766 bounded the media time read after a playing seek by the target
plus the real time that passed plus two frames. A playing source
decodes ahead, so the time it reports can run ahead of the frame it
shows, and on a fast runner that exceeds two frames: macOS Tier 2 saw
4666 ms for a 4500 ms seek 97 ms after it (limit 4663 ms), with the
right first frame. Locally it runs 66 ms ahead after 40 ms.

Keep both allowances: the elapsed time for a slow runner, plus the
500 ms the test allowed before obs-rust#1766 for running ahead. The first-frame
check and the lower bound are unchanged.

Fixes obs-rust#1774
@rdoupe

rdoupe commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

This now fails macOS Tier 2 on any PR rebased onto master (e.g. #1773 twice: media time 4666 ms, 82 ms after the seek, limit 4648 ms), since master has #1766's tight bound. Landing this unblocks them.

Merged via the queue into obs-rust:master with commit b39a4e0 Oct 22, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

test: playing_seek_between_keyframes too tight after #1766 (media time runs ahead while decoding)

2 participants