[BUG] taglib doesn't detect flac in ogg files

Rafaël Carré funman at videolan.org
Sun Aug 19 19:41:19 CEST 2007


Hello,

I noticed that taglib can't read information in ogg/flac files.
The code is present, but file type matching is done onlty following the
extension ( taglib/fileref.cpp:FileRef::create() )

So, .ogg leads to Ogg/Vorbis and .flac leads to flac

Instead, file detection should be made like in 'file' command:

4 first bytes = "OggS" -> Ogg
29->32nd bytes = "fLaC" -> Ogg/Flac
29->35th bytes = 0x1"vorbis" -> Ogg/Vorbis

and it could be extended to match also MPC & MPEG files.

I only code C and so can't easily do C++ this is why i didn't try to
propose a patch.

Please let me know (at this email, because i'm not subscribed to the ML)
if work has begun / is in discussion / will be done / is waiting for my
patch.

Thanks

-- 
Rafaël Carré <funman at videolan.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20070819/c5ddd2f6/attachment.pgp 


More information about the taglib-devel mailing list