Validate RTP packets. (#2778)

* Validate RTP packets.

Check version, payload type (if available) and SSRC (if available)
and drop bad packets. And let repair mechanisms take effect for those
packets.

* address data race reported by test

* fix an unlock and test packets
This commit is contained in:
Raja Subramanian
2024-06-10 15:43:59 +05:30
committed by GitHub
parent a31f59b689
commit 129ba62d61
5 changed files with 81 additions and 15 deletions
+1 -3
View File
@@ -358,9 +358,7 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.Tra
bitrates = int(ti.Layers[layer].GetBitrate())
}
if t.IsSimulcast() {
t.MediaTrackReceiver.SetLayerSsrc(mime, track.RID(), uint32(track.SSRC()))
}
t.MediaTrackReceiver.SetLayerSsrc(mime, track.RID(), uint32(track.SSRC()))
buff.Bind(receiver.GetParameters(), track.Codec().RTPCodecCapability, bitrates)