File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,6 @@ type Subscriber struct {
3434 call * Call
3535 sender * webrtc.RTPSender
3636 publisher * Publisher
37-
38- ssrc uint32
3937}
4038
4139func NewSubscriber (call * Call ) * Subscriber {
@@ -81,7 +79,6 @@ func (s *Subscriber) Subscribe(publisher *Publisher) {
8179 s .mutex .Lock ()
8280 s .Track = track
8381 s .sender = sender
84- s .ssrc = uint32 (sender .GetParameters ().Encodings [0 ].SSRC )
8582 s .publisher = publisher
8683 s .mutex .Unlock ()
8784
@@ -130,17 +127,18 @@ func (s *Subscriber) forwardRTCP() {
130127
131128 packetsToForward := []rtcp.Packet {}
132129 readSSRC := uint32 (s .publisher .Track .SSRC ())
130+ senderSSRC := uint32 (s .sender .GetParameters ().Encodings [0 ].SSRC )
133131
134132 for _ , packet := range packets {
135133 switch typedPacket := packet .(type ) {
136134 // We mung the packets here, so that the SSRCs match what the
137135 // receiver expects
138136 case * rtcp.PictureLossIndication :
139- typedPacket .SenderSSRC = s . ssrc
137+ typedPacket .SenderSSRC = senderSSRC
140138 typedPacket .MediaSSRC = readSSRC
141139 packetsToForward = append (packetsToForward , typedPacket )
142140 case * rtcp.FullIntraRequest :
143- typedPacket .SenderSSRC = s . ssrc
141+ typedPacket .SenderSSRC = senderSSRC
144142 typedPacket .MediaSSRC = readSSRC
145143 packetsToForward = append (packetsToForward , typedPacket )
146144 }
You can’t perform that action at this time.
0 commit comments