Bug 75961 - FLAC-plugin problem with long files
Summary: FLAC-plugin problem with long files
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-23 23:55 UTC by Nicolas Dietrich
Modified: 2004-02-24 16:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Dietrich 2004-02-23 23:55:11 UTC
Version:           0.11.5 (using KDE KDE 3.2.0)
Installed from:    RedHat RPMs
OS:          Linux

The k3b FLAC-plugin calculates the wrong track length for FLAC files longer than 21:38 min (=1298 s). 

The resulted track length is consequently shown as real track length modulo 1298 s, e.g.
Keith Jarretts Köln Concert - Part I is shown as 04:23 instead of 26:01,
Neil Youngs Arc is 13:20 instead of 34:58,
Pink Floyds Echoes is 01:53 instead of 32:31.

For FLAC files shorter than 21:38 min, the plugin works fine.
For .wav or .ogg files longer than 21:38, there is no such problem, so it must be the FLAC plugin.

Thanks for fixing,
nico
Comment 1 Nicolas Dietrich 2004-02-24 00:34:37 UTC
sorry, typo:
Pink Floyd - Echoes is 01:53 instead of 23:31 ->  23:31 mod 21:38 = 01:53
Comment 2 toojays 2004-02-24 08:11:01 UTC
That is interesting. Thanks for going into detail to isolate the bug, this looks like a good bug report. I hope to check it out tonight sometime.
Comment 3 toojays 2004-02-24 09:33:27 UTC
Nico,

Thanks for the bug report, and sorry about the bug. I had a parenthesis in the wrong place, this patch will fix it for you.

--- k3bflacdecoder.cpp  22 Feb 2004 10:07:06 -0000      1.13
+++ k3bflacdecoder.cpp  24 Feb 2004 08:31:50 -0000
@@ -203,7 +203,7 @@
 {
   cleanup();

-  frames = (unsigned long)ceil((d->samples * 75.0))/d->rate;
+  frames = (unsigned long)ceil((d->samples * 75.0)/d->rate);
   samplerate = d->rate;
   ch = d->channels;
Comment 4 Sebastian Trueg 2004-02-24 16:08:48 UTC
applied to HEAD and 0.11 branch. Will be in 0.11.6. :) thanks.
Comment 5 Sebastian Trueg 2004-02-24 16:09:00 UTC
*** Bug has been marked as fixed ***.