diff --git a/pkg/buffer/interceptor.go b/pkg/buffer/interceptor.go index 91d2b9495..f336d7617 100644 --- a/pkg/buffer/interceptor.go +++ b/pkg/buffer/interceptor.go @@ -90,7 +90,7 @@ func (i *Interceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor. return writer } -func (i *Interceptor) GetBufferedPackets(ssrc uint32, snOffset uint16, tsOffset uint32, sn []uint16) []rtp.Packet { +func (i *Interceptor) GetBufferedPackets(ssrc, mediaSSRC uint32, snOffset uint16, tsOffset uint32, sn []uint16) []rtp.Packet { buffer := i.getBuffer(ssrc) if buffer == nil { return nil @@ -101,6 +101,7 @@ func (i *Interceptor) GetBufferedPackets(ssrc uint32, snOffset uint16, tsOffset if err != nil { continue } + h.SSRC = mediaSSRC h.SequenceNumber -= snOffset h.Timestamp -= tsOffset pkts = append(pkts, rtp.Packet{ diff --git a/pkg/sfu/router.go b/pkg/sfu/router.go index 463987706..b51fc0909 100644 --- a/pkg/sfu/router.go +++ b/pkg/sfu/router.go @@ -204,6 +204,7 @@ func (r *router) loopDownTrackRTCP(track *DownTrack) { for _, pair := range p.Nacks { for _, pt := range r.buffer.GetBufferedPackets( track.receiver.SSRC(track.currentSpatialLayer), + track.ssrc, track.snOffset, track.tsOffset, track.nList.getNACKSeqNo(pair.PacketList())) {