mirror of
https://github.com/openjdk/jdk7u.git
synced 2025-12-10 20:36:33 -06:00
8273290: Enhance sound handling
Reviewed-by: bae
This commit is contained in:
parent
ebeadc89d3
commit
d91d3e7350
@ -386,6 +386,10 @@ final class SMFParser {
|
||||
// meta
|
||||
int metaType = readUnsigned();
|
||||
int metaLength = (int) readVarInt();
|
||||
if (metaLength < 0) {
|
||||
throw new InvalidMidiDataException("length out of bounds: "
|
||||
+ metaLength);
|
||||
}
|
||||
|
||||
byte[] metaData = new byte[metaLength];
|
||||
read(metaData);
|
||||
|
||||
@ -89,6 +89,10 @@ public final class WaveFloatFileReader extends AudioFileReader {
|
||||
samplerate = chunk.readUnsignedInt();
|
||||
/* framerate = */chunk.readUnsignedInt();
|
||||
framesize = chunk.readUnsignedShort();
|
||||
if (framesize == 0) {
|
||||
throw new UnsupportedAudioFileException(
|
||||
"Can not process audio format with 0 frame size");
|
||||
}
|
||||
bits = chunk.readUnsignedShort();
|
||||
}
|
||||
if (chunk.getFormat().equals("data")) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user