Remove ChannelCount Max Limitation on OpusDecoder

This commit is contained in:
Colin Kho 2024-12-11 16:03:42 +08:00
parent 8d2f531470
commit af32e859ed

View File

@ -107,12 +107,10 @@ public final class OpusDecoder
throw new OpusDecoderException("Invalid header length");
}
channelCount = getChannelCount(headerBytes);
if (channelCount > 8) {
throw new OpusDecoderException("Invalid channel count: " + channelCount);
}
int gain = readSignedLittleEndian16(headerBytes, 16);
byte[] streamMap = new byte[8];
byte[] streamMap = new byte[channelCount];
int numStreams;
int numCoupled;
if (headerBytes[18] == 0) { // Channel mapping