From 9792bdf49485f3d15cac5df41ef64644b233d071 Mon Sep 17 00:00:00 2001 From: Cedric Verstraeten Date: Thu, 6 Feb 2025 08:28:17 +0100 Subject: [PATCH] Update main.go --- machinery/src/webrtc/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machinery/src/webrtc/main.go b/machinery/src/webrtc/main.go index 60aed16..0431018 100644 --- a/machinery/src/webrtc/main.go +++ b/machinery/src/webrtc/main.go @@ -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