Skip to content

Commit

Permalink
Fix crash when wav files have a sample width less than 8.
Browse files Browse the repository at this point in the history
  • Loading branch information
jburton committed Sep 18, 2011
1 parent 686bcf5 commit f663b25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion taglib/riff/wav/wavproperties.cpp
Expand Up @@ -125,5 +125,5 @@ void RIFF::WAV::Properties::read(const ByteVector &data)

d->length = byteRate > 0 ? d->streamLength / byteRate : 0;
if(d->channels > 0 && d->sampleWidth > 0)
d->sampleFrames = d->streamLength / (d->channels * (d->sampleWidth / 8));
d->sampleFrames = (d->streamLength / (d->channels * d->sampleWidth)) / 8;
}

0 comments on commit f663b25

Please sign in to comment.