Head start: tuning in to a warm channel pauses its releases for up to 16 s, and a false "stalling" swap follows #125
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
cmoriarty/sports-breaker#125
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A bug from #117 (PR #119). It hits nearly every tune of a background channel, which is how Emby viewers normally watch.
What happens
On 2026-11-08 the owner tuned in to 49ers vs. Raiders at 22:19:25 in Emby for Android, playing direct. The channel had been warm since 21:54:19 on edgestream3.pro (via tvsportslive.fr), holding its 15 s head start.
stalling, "the player got 0.82× real time"The owner saw a micro skip. The stream itself was fine. The pause in releases was the app's own:
Timeline.release(hold=True)), only segments over the depth are released.Timeline._release, which setsdue = min(max(due, now) + length, now + depth × length).dueone segment further ahead. Nothing pulls it back during the hold, because the clock's own releases are switched off.duecan sit up todepth × lengthin the future: 16 s for 8 segments of 2 s.release()keeps that futuredue(self.due = max(self.due, now)). No new segment reaches the viewer until it arrives, while the player runs on what it was given at the tune._served_from). Once it has 30 s, it reads the pause as the stream delivering 0.82× real time._judgecalls it stalling, and the channel swaps away from a good stream, here onto a slower CDN.The idea
self.due = now. The oldest held segment goes out at once, and one follows each segment length after that.duefrom drifting during the hold: an over-depth release while holding setsdueto one segment ahead of now, not ahead of the olddue._judge's slack should also count from_served_fromrather than the landing. It usesnow - landed, while the served rate it pairs with counts from the end of the hold.Done when
duehas drifted ahead;Closing: merged to develop in PR #126 (merge
b7370d0), milestone 41. It deploys once nobody is watching.What changed:
Tests: a bursty hold, then a 0.8× source after the tune. On the old code they fail with "stalling 30 s after the tune".
Not seen live yet: a tune of a warm channel with no swap in its first minute.