emit a decode error in case of packets with wrong SSRC

This commit is contained in:
aler9
2023-08-17 14:41:47 +02:00
committed by Alessandro Ros
parent 8b047b545b
commit 4e000eb2dd
13 changed files with 323 additions and 289 deletions

View File

@@ -103,7 +103,12 @@ func (ct *clientFormat) readRTPUDP(pkt *rtp.Packet) {
now := ct.cm.c.timeNow()
for _, pkt := range packets {
ct.rtcpReceiver.ProcessPacket(pkt, now, ct.format.PTSEqualsDTS(pkt))
err := ct.rtcpReceiver.ProcessPacket(pkt, now, ct.format.PTSEqualsDTS(pkt))
if err != nil {
ct.cm.c.OnDecodeError(err)
continue
}
ct.onPacketRTP(pkt)
}
}
@@ -123,6 +128,12 @@ func (ct *clientFormat) readRTPTCP(pkt *rtp.Packet) {
}
now := ct.cm.c.timeNow()
ct.rtcpReceiver.ProcessPacket(pkt, now, ct.format.PTSEqualsDTS(pkt))
err := ct.rtcpReceiver.ProcessPacket(pkt, now, ct.format.PTSEqualsDTS(pkt))
if err != nil {
ct.cm.c.OnDecodeError(err)
return
}
ct.onPacketRTP(pkt)
}