Bug 135459 - [patch] incorrect calculation of mpeg duration
Summary: [patch] incorrect calculation of mpeg duration
Status: RESOLVED DUPLICATE of bug 130625
Alias: None
Product: taglib
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-11 16:18 UTC by Debajyoti Bera
Modified: 2006-10-11 16:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
mpeg frame duration patch (1.70 KB, patch)
2006-10-11 16:20 UTC, Debajyoti Bera
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Debajyoti Bera 2006-10-11 16:18:47 UTC
Version:           1.4 (svn) (using KDE KDE 3.5.4)
Installed from:    Compiled From Sources
OS:                Linux

(From taglib-devel mailing list entry:
http://mail.kde.org/pipermail/taglib-devel/2006-October/000513.html)

There are two major bugs in framelength computation and calculation time/frame for mpeg files.

For framelength, the formula is different for layer 1, 2 and 3 files. Taglib doesnt use separate formula for 2 and 3.
For calculation time/frame, mpeg 2 and 2.5 (LSF) have different blocksize than mpeg-1. Taglib doesnt take that into account.
These two bugs lead to incorrect calculation of frame duration.

I am attaching a patch fixing these. I based my calculations on lame(mpglib) source code and mpeg header information given in
http://www.codeproject.com/audio/mpegaudioinfo.asp
Comment 1 Debajyoti Bera 2006-10-11 16:20:42 UTC
Created attachment 18092 [details]
mpeg frame duration patch

Fix mpeg frame duration calculation.
Comment 2 Scott Wheeler 2006-10-11 16:21:56 UTC

*** This bug has been marked as a duplicate of 130625 ***