Re: severe discrepancies in mp3 frame counts

Ben Winslow <[email protected]>
Newsgroups gmane.comp.multimedia.xmms.devel
Message-ID <[email protected]>
On Wed, 2004-05-26 at 09:47, Chris Nandor wrote:
> At 3:50 -0400 2004.05.26, Ben Winslow wrote:
> >It looks like MP3::Info is barfing on ID3v2 tags--"A Slow Descent" has
> >one, and I suspect the others do as well (although I didn't check.)
> 
> No, MP3::Info handles ID3v2 tags just fine.

Hmm.  So it does.

Now that it's not 4am, I took a look at MP3::Info and found the bug:
--- Info.pm.bak 2004-05-26 21:28:34.000000000 -0400
+++ Info.pm     2004-05-26 21:35:57.000000000 -0400
@@ -702,7 +702,7 @@
        my $mfs         = $h->{fs} / ($h->{ID} ? 144000 : 72000);
        $i->{FRAMES}    = int($vbr && $vbr->{frames}
                                ? $vbr->{frames}
-                               : $i->{SIZE} / $h->{bitrate} / $mfs
+                               : $i->{SIZE} / ($h->{bitrate} / $mfs)
                          );

        if ($vbr) {

The $h->{bitrate} / $mfs bit to find the bytes per frame needs to happen
first, and it wasn't.  Always the little things.  ;)

Cheers,
-- 
Ben Winslow <[email protected]>

_______________________________________________
xmms-devel mailing list
[email protected]
http://lists.xmms.org/mailman/listinfo/xmms-devel
signature.asc (application/pgp-signature, 900 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Fingerprint: 17F8 0D02 A7DA 7C7F A661  183D 6E2A 04FD 410A 2DCF

iQIVAwUAQLVGsW4qBP1BCi3PAQJLCQ//emzb9gQYk+6+NJzBXkxcNAOuhL3NO4P0
+CvPmSwLhgZd3TINkG/Mz1WRRWU4MSOoMUg3pU/knPxHpqcez3rOgpQaP/Uvmg5A
Wd5Skq8OmQxovwCNbjsu32LUagGgbIvk5f0Z76cWHrL/CCQEuZz7r9Zs8nV/luYr
Bgfopls/Fbbgv2yBKVHZfoOIdlTPYo0McI1VU59rldRHv9k9adX2I+2EMfjcpAFI
6EDTL/GKbPzGJbEDeiXDYiNRhfRYEt5sa4LSLkUdgPrvNEsipN0vsOFkZK1tv/oZ
CVvbRMfU455rVnSOZK9JsUa4NKTDGICGHKHyFFtyd+p4sWrx3X8DEgyr+xjfEbdU
2XQ6/yLnPKbR1igRUfjt+Bq7Szw3u0n325CaXl9AfUXm9M8YaQpt8FjiobBF6+Mq
gIRV+5oEmyPisnr1jmOGKToOrcmkViPYGIK8yJhrchju5QpcpqaYGKxUBAR5qDjA
sE7DkhREr64oqcJOmhy/veTLn+JB76q7sizHPnIquIz/EWab7fYQF5SfBBJ86QGU
CIJRtM4xO0Bk46VxeA52TtDq/9g4kgZg1iKFqDQXwgvAdlieV1O1ee6+IO2jWwz5
81urgWrS1k0aL4D0Tg8ElPemra9iYtmwTfrRo8T2zJrw8s4qpKaKVx0fa22gISsj
/Q2XfqTqO3c=
=EZO6
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.