Log large packets receive/send. (#4521)

* Log large packets receive/send.

Seeing cases of servers reporting need for segmentation/re-assembly of
packets. So, logging packet receive/send for RTP/RTCP to check if
anything is seeing more than 1400 byte packets.

* log downtrack RTCP too
This commit is contained in:
Raja Subramanian authored and GitHub committed 2026-05-13 16:04:53 +05:30
1 parent d123675008
commit ef2e5efe14
5 files changed
+30 -3

No files matched your search

+4 -2
View File
@@ -138,9 +138,11 @@ func (b *Buffer) Bind(params webrtc.RTPParameters, codec webrtc.RTPCodecCapabili
}
// Write adds an RTP Packet, ordering is not guaranteed, newer packets may arrive later
//
//go:noinline
func (b *Buffer) Write(pkt []byte) (n int, err error) {
if len(pkt) > 1400 {
b.logger.Infow("large RTP packet received", "size", len(pkt))
}
var rtpPacket rtp.Packet
err = rtpPacket.Unmarshal(pkt)
if err != nil {