Bug in Ogg FLAC comment rendering (framing bit added)
Stephen F. Booth
me at sbooth.org
Fri Oct 9 23:09:16 CEST 2009
A user of one of my products reported a bug concerning Ogg FLAC files-
specifically that they were being corrupted
(https://bugs.launchpad.net/maxosx/+bug/445970).
It appears taglib is the source of the problem; from a post by Josh
Coalson on HydrogenAudio:
I found the problem. it's happening in max. max uses taglib to add the
vorbis comment. when taglib does that for native flac it does not add
the framing bit (which turns into a byte) at the end (which is correct
according to flac).
but when it does it for ogg flac, it uses the the straight
comment->render() call which by default adds the framing bit(byte).
this screws up the comment reading by libflac.
I can't remember if the framing bit part was always in the vorbis
comment spec: I thought I followed it more or less exactly when I
defined the equivalent thing in flac. but the flac flavor has no
framing bit.
So it seems that simply changing line 96 of oggflacfile.cpp from
d->xiphCommentData = d->comment->render();
to
d->xiphCommentData = d->comment->render(false);
would fix the problem, but I haven't tested this.
Stephen
More information about the taglib-devel
mailing list