Skip to content

refactor(pipewire): ensure monotonic timestamps#1247

Merged
roderickvd merged 2 commits into
masterfrom
fix/pipewire-timestamp-overrun
Jun 10, 2026
Merged

refactor(pipewire): ensure monotonic timestamps#1247
roderickvd merged 2 commits into
masterfrom
fix/pipewire-timestamp-overrun

Conversation

@roderickvd

Copy link
Copy Markdown
Member

Similar in spirit to #1246 but without the race.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to prevent PipeWire stream timestamps from becoming non-monotonic when PipeWire reports unusual clock values, aligning PipeWire’s timestamp behavior with the general monotonic expectations across backends.

Changes:

  • Clamp PipeWire Time::now()-derived nanosecond values to avoid negative-to-u64 wrap behavior.
  • Update the changelog with an Unreleased entry documenting the PipeWire timestamp fix.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/host/pipewire/stream.rs Adjusts timestamp construction from PipeWire time readings to avoid negative values when converting to StreamInstant.
CHANGELOG.md Adds an Unreleased “Fixed” entry noting the PipeWire timestamp correction and adds the [Unreleased] compare link.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/host/pipewire/stream.rs
Comment thread src/host/pipewire/stream.rs
@roderickvd roderickvd changed the title fix(pipewire): ensure monotonic timestamps refactor(pipewire): ensure monotonic timestamps Jun 10, 2026
@roderickvd roderickvd merged commit 6ea4fcd into master Jun 10, 2026
30 checks passed
@roderickvd roderickvd deleted the fix/pipewire-timestamp-overrun branch June 10, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants