mirror of
https://github.com/kerberos-io/agent.git
synced 2026-11-14 21:40:41 +00:00
Merge pull request #163 from kerberos-io/fix/webrtc-sample-timing
Fix / WebRTC sample timing
This commit is contained in:
@@ -401,7 +401,7 @@ func WriteToTrack(livestreamCursor *packets.QueueCursor, configuration *models.C
|
||||
if pkt.IsVideo {
|
||||
|
||||
// Calculate the difference
|
||||
bufferDuration := pkt.Time - previousTimeVideo
|
||||
bufferDuration := int64(pkt.TimeLegacy) - previousTimeVideo
|
||||
previousTimeVideo = pkt.Time
|
||||
|
||||
// Start at the first keyframe
|
||||
@@ -434,7 +434,7 @@ func WriteToTrack(livestreamCursor *packets.QueueCursor, configuration *models.C
|
||||
}
|
||||
|
||||
// Calculate the difference
|
||||
bufferDuration := pkt.Time - previousTimeAudio
|
||||
bufferDuration := int64(pkt.TimeLegacy) - previousTimeAudio
|
||||
previousTimeAudio = pkt.Time
|
||||
|
||||
// We will send the audio
|
||||
|
||||
Reference in New Issue
Block a user