Skip to content

Keep voice RTP timestamps aligned to 20 ms packets - #48824

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1511c739b77ee5871f72723fd34cb67aa9a48c95
Sep 28, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/1511c739b77ee5871f72723fd34cb67aa9a48c95

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Keep voice RTP timestamps aligned to 20 ms packets

Why

Capture jitter and mute transitions can shift RTP timestamps off the 20 ms source grid, causing receivers that assemble fixed-duration frames to reject subsequent audio.

What changed

Advance elapsed gaps in whole 20 ms packets and keep the track clock on that grid. Bias empty gap durations by 1 ns to avoid losing an RTP tick to floating-point truncation.

Testing

Update jitter and mute tests to assert exact clock advancement, including a 580 ms gap, and verify that resumed RTP timestamps stay aligned to 960-sample packets.

## Why

Capture jitter and mute transitions can shift RTP timestamps off the 20 ms source grid, causing receivers that assemble fixed-duration frames to reject subsequent audio.

## What changed

Advance elapsed gaps in whole 20 ms packets and keep the track clock on that grid. Bias empty gap durations by 1 ns to avoid losing an RTP tick to floating-point truncation.

## Testing

Update jitter and mute tests to assert exact clock advancement, including a 580 ms gap, and verify that resumed RTP timestamps stay aligned to 960-sample packets.

GitOrigin-RevId: 1511c739b77ee5871f72723fd34cb67aa9a48c95
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/1511c739b77ee5871f72723fd34cb67aa9a48c95 branch from f80ff24 to 84cc4b3 Compare September 28, 2026 00:43
@copyberry
copyberry Bot merged commit 84cc4b3 into main Sep 28, 2026
1 check failed
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/1511c739b77ee5871f72723fd34cb67aa9a48c95 branch September 28, 2026 00:43
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 28, 2026
@jgsjss
jgsjss deployed to issue-triage September 28, 2026 00:50 — with GitHub Actions Active
@jgsjss
jgsjss deployed to issue-triage September 28, 2026 00:50 — with GitHub Actions Active
@jgsjss
jgsjss deployed to issue-triage September 28, 2026 00:50 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 84cc4b3f Deployed Sep 28, 2026 by jgsjss via Generate label suggestions #49203
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants