[patch] bitrate rounding errors on short mp3s

Mark 'Mook' Yen mook at songbirdnest.com
Fri Oct 10 20:33:23 CEST 2008


Hello,

I have a bug and a patch, and I'm not sure if I'm supposed to send 
things here or bugs.kde.org :)

http://websvn.kde.org/trunk/kdesupport/taglib/taglib/mpeg/mpegproperties.cpp?annotate=770859#l217

Given a very short mp3 (or any other mpeg file, really), with a 
Xing/Info header, the bitrate calculation has a rounding error.  On line 
221, the length is forced into an integer; for a short sample with a 
non-integral length this leads to the bitrate being incorrectly 
calculated.  (My testcase had 13.7 seconds of audio in a 64kbps CBR mp3, 
and it was rounded to about 67.)

--
Mark 'Mook' Yen
mook at songbirdnest
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sb.bug.12644.mp3.xingheader.bitrate.rounding.0.patch
Url: http://mail.kde.org/pipermail/taglib-devel/attachments/20081010/11aa35a8/attachment.bat 


More information about the taglib-devel mailing list