[Flac-dev] reading vorbis comments with FLAC++?
Joshua Kwan
joshk at triplehelix.org
Tue Nov 11 16:22:08 PST 2003
Hi me (2x - Haberman and Coalson),
On Tue, Nov 11, 2003 at 03:51:42PM -0800, Josh Coalson wrote:
> The C++ interface is a little simpler:
[code follows]
OK. Well, I found the C interface a little bit easier to understand, so
I ended up using that instead of continuing to try to figure out the C++
interface.
The one problem I have is that the values in block->data.
vorbis_comment.comments tend to have trailing junk. For example:
Breakpoint 1, get_flac(Song*, char const*) (flac=0x806b8a8,
path=0x8068844 "/usr/share/mp3/01-dazed_and_confused.flac")
at ftfuncs.cc:53
53 for (i = 0; i < e->length; i++)
(gdb) p e->entry
$6 = (FLAC__byte *) 0x8066118 "TITLE=Dazed And Confused8Ini\021"
[...]
This only seems to happen sometimes, and the only reliable way to
prevent myself from treading into wild memory is to iterate e->length
times over each character in e->entry every single time and not go one
byte further.
I'm obviously doing something slightly wrong I suppose. The offending
code is at <http://cvs.triplehelix.org/tagreport/ftfuncs.cc>, function
get_flac().
But thanks for all your help. I might change to the C++ interface later
if I have time since the rest of the project is in C++ anyway.
Thanks,
--
Joshua Kwan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20031111/49c10dca/attachment.pgp
More information about the Flac-dev
mailing list