mirror of
https://github.com/kerberos-io/agent.git
synced 2026-08-23 15:08:32 +00:00
Fix packet handling in WriteToTrack to ensure proper processing of next packets on timeout and empty data
This commit is contained in:
@@ -433,11 +433,13 @@ func WriteToTrack(livestreamCursor *packets.QueueCursor, configuration *models.C
|
||||
if config.Capture.ForwardWebRTC == "true" && (hasTimedOut || hasNoPeers) {
|
||||
start = false
|
||||
receivedKeyFrame = false
|
||||
pkt = nextPkt
|
||||
continue
|
||||
}
|
||||
|
||||
if len(pkt.Data) == 0 || pkt.Data == nil {
|
||||
receivedKeyFrame = false
|
||||
pkt = nextPkt
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -445,6 +447,7 @@ func WriteToTrack(livestreamCursor *packets.QueueCursor, configuration *models.C
|
||||
if pkt.IsKeyFrame {
|
||||
receivedKeyFrame = true
|
||||
} else {
|
||||
pkt = nextPkt
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user