don't push 0 ssrc probing packets to pending queue (#2888)

This commit is contained in:
cnderrauber
2024-07-23 17:58:04 +08:00
committed by GitHub
parent 0fd09d73c1
commit f6f6cca133
+7
View File
@@ -349,6 +349,13 @@ func (b *Buffer) Write(pkt []byte) (n int, err error) {
}
}
// libwebrtc will use 0 ssrc for probing, don't push the packet to pending queue to avoid memory increasing since
// the Bind will not be called to consume the pending packets. More details in https://github.com/pion/webrtc/pull/2816
if rtpPacket.SSRC == 0 {
b.Unlock()
return
}
// handle RTX packet
if pb := b.primaryBufferForRTX; pb != nil {
b.Unlock()