[mythtv] [PATCH] Mythmusic not finding track length for .flac files

Colin Guthrie myth at colin.guthr.ie
Wed Dec 29 11:15:21 UTC 2004


Wendy Seltzer wrote:
> I think I've tracked down the problem here but don't have the C++ 
> know-how to fix it:
> Reading the track length of flac files appears to have broken in the big 
> Nov. 26 mythmusic patch.  A rollback to CVS from Nov. 25 reads track 
> lengths again (and once they're in the db, they stay there).  It looks 
> as though some of the code didn't make it from flacdecoder.cpp into 
> metaioflacvorbiscomment.cpp

Bang on Wendy!

I'd not really noticed the FLAC decoders correct identification of track 
length and thought it hadn't been implemented, but it's all there.

A simple comment out of a line just before the Metadata constructor 
would have actually fixed it, but here is a more complete patch that 
sticks to the structure laid down by the metio base class. Not sure if 
it'll be needed in the future in this way, but it's probably wise to 
stick to it just in case.

Having recently upgraded my flac libraries, I had to add in a
#define HAVE_INTTYPES_H to the files that included <FLAC/*.h> for this 
to compile.

I don't think it will get in the way of the older implementation, but 
there may be a more correct way fo defining the 64 bit compatibility 
layer.... (I know very little about this!).

The attached patch contains both the length fix and the insertion of 
these #defines into three files. Feel free not to apply the #define bits 
if it's not appropriate (should be trivial to strip out of the patch).

All the best.

Col.

-- 

+------------------------+
|     Colin Guthrie      |
+------------------------+
|   myth at colin.guthr.ie  |
| http://colin.guthr.ie/ |
+------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: flac_compile_fix_length_fix.diff
Type: text/x-patch
Size: 5221 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041229/4d56e823/flac_compile_fix_length_fix.bin


More information about the mythtv-dev mailing list