FLAC bitrate issue
kickbits at gmail.com
Fri Mar 21 04:00:50 CET 2008
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
in the file:
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?
More information about the taglib-devel