diff --git a/taglib/mp4/mp4properties.cpp b/taglib/mp4/mp4properties.cpp index df83d641..c932ed0d 100644 --- a/taglib/mp4/mp4properties.cpp +++ b/taglib/mp4/mp4properties.cpp @@ -224,7 +224,7 @@ MP4::Properties::read(File *file, const Atoms *atoms) pos += 10; if(const unsigned int bitrateValue = data.toUInt(pos); bitrateValue != 0 || d->length <= 0) { - d->bitrate = static_cast((bitrateValue + 500) / 1000.0 + 0.5); + d->bitrate = static_cast(bitrateValue / 1000.0 + 0.5); } else { d->bitrate = static_cast( diff --git a/taglib/mpeg/mpegheader.cpp b/taglib/mpeg/mpegheader.cpp index c20b89d3..084a3486 100644 --- a/taglib/mpeg/mpegheader.cpp +++ b/taglib/mpeg/mpegheader.cpp @@ -239,7 +239,7 @@ void MPEG::Header::parse(File *file, offset_t offset, bool checkLength) (static_cast(frameLengthData[0]) << 3) | (static_cast(frameLengthData[1]) >> 5); - d->bitrate = static_cast(d->frameLength * d->sampleRate / 1024.0 + 0.5) * 8 / 1024; + d->bitrate = static_cast(d->frameLength * d->sampleRate / 1024.0 + 0.5) * 8 / 1000; } } else {