Merge PR #2825: Revert 91dc3d39f0 ('Move counter variable in processMsg into Opus condition.').

This commit is contained in:
Mikkel Krautz 2017-02-07 20:04:42 +01:00 committed by GitHub
commit 2fb5ee7091

View File

@ -978,6 +978,7 @@ void Server::processMsg(ServerUser *u, const char *data, int len) {
return;
QByteArray qba, qba_npos;
unsigned int counter;
char buffer[UDP_PACKET_SIZE];
PacketDataStream pdi(data + 1, len - 1);
PacketDataStream pds(buffer+1, UDP_PACKET_SIZE-1);
@ -998,9 +999,11 @@ void Server::processMsg(ServerUser *u, const char *data, int len) {
}
}
// Read the sequence number.
pdi >> counter;
// Skip to the end of the voice data.
if ((type >> 5) != MessageHandler::UDPVoiceOpus) {
unsigned int counter;
do {
counter = pdi.next8();
pdi.skip(counter & 0x7f);