Skip to content

Commit

Permalink
[RSDK-9574] - Do not bump sequence number for each track (#4644)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanavery authored and 10zingpd committed Dec 18, 2024
1 parent 6274a3f commit 01914a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gostream/webrtc_track.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 01914a6

Please sign in to comment.