debug("RIFF::AIFF::File::read() - Duplicate ID3v2 tag found.");
}
}
- else if(name == "COMM" && readProperties)
- formatData = chunkData(i);
+ else if(name == "COMM" && readProperties) {
+ if(formatData.isEmpty()) {
+ formatData = chunkData(i);
+ }
+ else {
+ debug("RIFF::AIFF::File::read() - Duplicate 'COMM' chunk found.");
+ }
+ }
}
if(!d->tag)
}
}
}
- else if(name == "fmt " && readProperties)
- formatData = chunkData(i);
- else if(name == "data" && readProperties)
- streamLength = chunkDataSize(i);
+ else if(name == "fmt " && readProperties) {
+ if(formatData.isEmpty()) {
+ formatData = chunkData(i);
+ }
+ else {
+ debug("RIFF::WAV::File::read() - Duplicate 'fmt ' chunk found.");
+ }
+ }
+ else if(name == "data" && readProperties) {
+ if(streamLength == 0) {
+ streamLength = chunkDataSize(i);
+ }
+ else {
+ debug("RIFF::WAV::File::read() - Duplicate 'data' chunk found.");
+ }
+ }
}
if(!d->tag[ID3v2Index])