Skip to content

Fix seeking back in live with timestamp wrapping (1.6.6 regression) - #7537

Merged
robwalch merged 1 commit into
masterfrom
bugfix/init-pts-below-zero
Sep 19, 2025
Merged

Fix seeking back in live with timestamp wrapping (1.6.6 regression)#7537
robwalch merged 1 commit into
masterfrom
bugfix/init-pts-below-zero

Conversation

@robwalch

@robwalch robwalch commented Sep 11, 2025

Copy link
Copy Markdown
Collaborator

This PR will...

Advance initPTS to accommodate timestamps in earlier segments when starting late in the timeline.

Why is this Pull Request needed?

When starting long running live streams without discontinuities, timestamps may have already wrapped in the past. This change anticipates that so that initPTS is not set to a value that would result in earlier segments timestamps getting unwrapped backwards to a value less than zero.

This issue did not occur prior to v1.6.6 with #7311, since in those older versions PTS was always remapped to the timeline. Now that PTS is preserved, it needs to be unwrapped if the timeline is long enough that a low starting "initPTS" would result in negative timestamps when seeking back.

Are there any points in the code the reviewer needs to double check?

Resolves issues:

Fixes #7536

Checklist

  • changes have been done against master branch, and PR does not conflict
  • changes cherry-picked into patch/v1.6.x branch
  • new unit / functional tests have been added (whenever applicable)
@robwalch robwalch added this to the 1.6.13 milestone Sep 11, 2025
@robwalch
robwalch marked this pull request as draft September 11, 2025 18:16
@robwalch
robwalch force-pushed the bugfix/init-pts-below-zero branch 2 times, most recently from 4fd8026 to b5ce1f7 Compare September 11, 2025 23:39
@robwalch
robwalch marked this pull request as ready for review September 11, 2025 23:41
@robwalch
robwalch force-pushed the bugfix/init-pts-below-zero branch from b5ce1f7 to 780b883 Compare September 12, 2025 00:00
@robwalch robwalch changed the title Normalize PTS based on timeline offset to advance wrapping of timesta… Fix seeking back in live with timestamp wrapping (1.6.6 regression) Sep 15, 2025
@robwalch
robwalch merged commit d819b45 into master Sep 19, 2025
16 checks passed
@robwalch
robwalch deleted the bugfix/init-pts-below-zero branch September 19, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant