Fix Opus voice streams (#3555)

This fixes a wrong assumption about incoming discord voice packets revealed during a recent discord change that broke incoming opus voice streams
This commit is contained in:
Marwin M
2019-10-29 13:22:21 +01:00
committed by Amish Shah
parent 9bcb6a04ba
commit 3a9eb5b929

View File

@@ -63,7 +63,9 @@ class PacketHandler extends EventEmitter {
if (byte === 0) continue;
offset += 1 + (0b1111 & (byte >> 4));
}
while (packet[offset] === 0) offset++;
// Skip over undocumented Discord byte
offset++;
packet = packet.slice(offset);
}