PDA

View Full Version : bug in Audio::FLAC from CPAN/Activestate ppd



mwphoto
2005-06-03, 02:41
This isn't strictly a slim thing, but I thought the community here sould
like to know.

I just got the Activestate version of Audio::FLAC and was using it to retag
some of my FLAC files. Unfortunately it has a bug in the write command and
corrupts the FLAC file.

I did manage to fix it, but I don't understand it well enough to know
whether it's properly fixed. The line I changed was as follows:

before:

seek FLACFILE, ($self->{'startMetadataBlocks'})-4, 0;

after

seek FLACFILE, ($self->{'startMetadataBlocks'}), 0;

It's around line 257, but I've made other changes while debugging so it may
not be exactly on that line.

The effect of the bug is to place the header information in the wrong place
and overwrite the 'fLaC' header bytes at the start of the file, which makes
it unreadable by anything that expects FLAC.

Malcolm