From 01914a6ecd70d3466da8e9c37cb52c1722f61267 Mon Sep 17 00:00:00 2001 From: Sean Pollock Date: Wed, 18 Dec 2024 15:52:44 -0500 Subject: [PATCH] [RSDK-9574] - Do not bump sequence number for each track (#4644) --- gostream/webrtc_track.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gostream/webrtc_track.go b/gostream/webrtc_track.go index 324def2c202..8e26d6550a2 100644 --- a/gostream/webrtc_track.go +++ b/gostream/webrtc_track.go @@ -124,14 +124,14 @@ func (s *trackLocalStaticRTP) WriteRTP(p *rtp.Packet) error { writeErrs := []error{} outboundPacket := *p - + sequenceNum := s.sequencer.NextSequenceNumber() for _, b := range s.bindings { outboundPacket.Header.SSRC = uint32(b.ssrc) outboundPacket.Header.PayloadType = uint8(b.payloadType) // We overwrite the sequence number to ensure continuity between packets // coming from Passthrough sources and those that are packetized by the // Pion RTP Packetizer in the WriteData method. - outboundPacket.Header.SequenceNumber = s.sequencer.NextSequenceNumber() + outboundPacket.Header.SequenceNumber = sequenceNum if _, err := b.writeStream.WriteRTP(&outboundPacket.Header, outboundPacket.Payload); err != nil { writeErrs = append(writeErrs, err) }