fix 1-minute offset when recording a H264 WebRTC track (#5275) (#5278)
Some checks are pending
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run

This commit is contained in:
Alessandro Ros 2025-12-19 13:32:14 +01:00 committed by GitHub
parent f1e3b373f5
commit 9e82b5233d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -313,7 +313,7 @@ func setupVideoTrack(
for _, pkt := range packets {
ntp := u.NTP.Add(timestampToDuration(int64(pkt.Timestamp), 90000))
pkt.Timestamp += u.RTPPackets[0].Timestamp
track.WriteRTPWithNTP(pkt, ntp.Add(-1*time.Minute)) //nolint:errcheck
track.WriteRTPWithNTP(pkt, ntp) //nolint:errcheck
}
return nil