Skip to content

feat: seek to the keyframe before a position with fastSeek - #497

Merged
devopvoid merged 3 commits into
mainfrom
feat/fast-seek
Oct 31, 2026
Merged

devopvoid merged 3 commits into
mainfrom
feat/fast-seek

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Adds MediaPlayer.fastSeek and MediaFileSource.fastSeek, which play from the keyframe at or before the position without decoding up to it, so they take no longer however far the keyframes are apart, as a slider being dragged needs; seek stays precise. Touches PerformSeek like the MPEG-TS seek fix, so whichever lands second needs a small rebase.

MediaPlayer.fastSeek and MediaFileSource.fastSeek play from the keyframe at or before the position, without decoding up to it, so they take no longer however far the keyframes are apart, as a slider being dragged needs.
Keeps the seek further back of #496 for precise seeks only: a fast seek plays from the keyframe the reader lands on.
A seek whose first picture came only when the decoder was drained at the end left its late landing behind, and a looping source took it on the next pass, sending the reader back to the end again.
@devopvoid
devopvoid merged commit 0267fe6 into main Oct 31, 2026
53 of 55 checks passed
@devopvoid
devopvoid deleted the feat/fast-seek branch October 31, 2026 20:06
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.

1 participant