From 357c92dee1538c5b4ca13b84731bd575648650f3 Mon Sep 17 00:00:00 2001 From: Jim Neuendorf Date: Wed, 18 Oct 2023 10:12:22 +0200 Subject: [PATCH] fix: Incorrect packet-deserialization bitmask --- lib/Packet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Packet.ts b/lib/Packet.ts index 4ad6792..9c92831 100644 --- a/lib/Packet.ts +++ b/lib/Packet.ts @@ -71,7 +71,7 @@ export class Packet { if ((buff[0] & 0xc0) >> 6 !== 2) { throw new Error(`invalid rtp packet ${buff[0] & 0xc0}`); } - const cc = buff[0] & 0x1f; + const cc = buff[0] & 0x0f; /* buff[1] = (M << 7 | PT) */ const payloadType = buff[1] & 0x7f; /* buff[2, 3] = SN */