Skip to content

fix: stamp custom media pushed without a timestamp on WebRTC's clock - #460

Merged
devopvoid merged 1 commit into
mainfrom
fix/custom-source-timebase
Oct 27, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/custom-source-timebase

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

CustomVideoSource.pushFrame(VideoFrame) and CustomAudioSource.pushAudio(...) without a timestamp used the time since their SyncClock was created, while the timestamped calls expect webrtc::TimeMicros(). A source mixing both calls saw its frame time jump back (e.g. 16,406,554,481 µs followed by 784 µs).

  • Both untimestamped calls now stamp with webrtc::TimeMicros(), the clock of SyncClock.currentTimeUs(); the video NTP capture time is derived as before.
  • On audio this also keeps the absolute capture time positive and on the clock WebRTC compares it with when sending resumes.
  • Javadoc, guides and the extension API header say the two calls share one clock.

pushFrame(VideoFrame) and pushAudio() without a timestamp used the time
since the SyncClock was created, while the timestamped calls expect
webrtc::TimeMicros(). Mixing both made the frame time jump back.
@devopvoid
devopvoid merged commit 0a87d42 into main Oct 27, 2026
25 checks passed
@devopvoid
devopvoid deleted the fix/custom-source-timebase branch October 27, 2026 06:28
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