Move counter variable in processMsg into Opus condition.

This commit is contained in:
Mikkel Krautz 2016-05-15 13:14:12 +02:00
parent 77ddc015b0
commit 91dc3d39f0

View File

@ -973,7 +973,6 @@ 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);
@ -994,11 +993,9 @@ 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);