diff --git a/taglib/riff/wav/wavproperties.cpp b/taglib/riff/wav/wavproperties.cpp index c8b7fd6b..f0453968 100644 --- a/taglib/riff/wav/wavproperties.cpp +++ b/taglib/riff/wav/wavproperties.cpp @@ -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 + 7) / 8)); }