Ignore compressed packets for voice, there is an issue

This commit is contained in:
Manevolent
2018-08-04 22:38:44 -04:00
parent 80a57784ef
commit a535724a4b
2 changed files with 10 additions and 0 deletions
@@ -499,6 +499,7 @@ public abstract class AbstractTeamspeakClientSocket
// Finally, handle compressed bodies // Finally, handle compressed bodies
if (packet.getBody() instanceof PacketBodyCompressed) { if (packet.getBody() instanceof PacketBodyCompressed) {
Ts3Debugging.debug("[PROTOCOL] DECOMPRESS " + networkPacket.getHeader().getType().name()); Ts3Debugging.debug("[PROTOCOL] DECOMPRESS " + networkPacket.getHeader().getType().name());
byte[] decompressed = QuickLZ.decompress(((PacketBodyCompressed) packet.getBody()).getCompressed()); byte[] decompressed = QuickLZ.decompress(((PacketBodyCompressed) packet.getBody()).getCompressed());
@@ -554,6 +555,14 @@ public abstract class AbstractTeamspeakClientSocket
} }
networkPacket.getHeader().setGeneration(generation); networkPacket.getHeader().setGeneration(generation);
// Ignore voice and whisper, there is a decompression issue with them
if (networkPacket.getHeader().getPacketFlag(HeaderFlag.COMPRESSED) && (
networkPacket.getHeader().getType() == PacketBodyType.VOICE ||
networkPacket.getHeader().getType() == PacketBodyType.VOICE_WHISPER
))
continue;
// Read packet (decrypt, decompress, etc) // Read packet (decrypt, decompress, etc)
Packet packet = readPacketIntl(networkPacket); Packet packet = readPacketIntl(networkPacket);
@@ -21,6 +21,7 @@ import com.github.manevolent.ts3j.protocol.packet.PacketBody2Command;
import com.github.manevolent.ts3j.util.HighPrecisionRecurrentTask; import com.github.manevolent.ts3j.util.HighPrecisionRecurrentTask;
import com.github.manevolent.ts3j.util.Ts3Debugging; import com.github.manevolent.ts3j.util.Ts3Debugging;
import java.io.Closeable;
import java.io.IOException; import java.io.IOException;
import java.net.*; import java.net.*;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;