From 02ad295e122786aa73b49d86ea5c155f6fb2c42f Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Mon, 6 Feb 2023 20:01:42 -0800 Subject: [PATCH] common: ignore rtcp packets that may be erroneously in the rtp stream --- plugins/webrtc/src/rtp-forwarders.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/webrtc/src/rtp-forwarders.ts b/plugins/webrtc/src/rtp-forwarders.ts index 121e11978..9d8cc2805 100644 --- a/plugins/webrtc/src/rtp-forwarders.ts +++ b/plugins/webrtc/src/rtp-forwarders.ts @@ -129,6 +129,10 @@ export async function startRtpForwarderProcess(console: Console, ffmpegInput: FF track.onRtp = rtp => { if (killDeferred.finished) return; + const payloadType = rtp.readUint8(1) & 0x7f; + // ignore rtcp. + if (payloadType >= 72 && payloadType <= 76) + return; old(rtp); } }