FLAC bitrate issue
Brett Hoyle
kickbits at gmail.com
Fri Mar 21 04:00:50 CET 2008
Hi,
I have FLAC files with bitrates high enough that it overflows a long in
the code below:
d->bitrate = d->length > 0 ? ((d->streamLength * 8L) / d->length) / 1000
: 0;
in the file:
TagLib\flac\flacproperties.cpp
The files are 24bit 48khz 5.1 FLAC files.
Changing the code to below, which uses an unsigned long fixes the overflow:
d->bitrate = d->length > 0 ? ((d->streamLength * 8UL) / d->length) /
1000 : 0;
Just making you guys aware and seeing if anyone has any better ideas?
Cheers
More information about the taglib-devel
mailing list