Bug in Ogg FLAC comment rendering (framing bit added)

View: New views
2 Messages — Rating Filter:   Alert me  

Bug in Ogg FLAC comment rendering (framing bit added)

by Stephen F. Booth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
_______________________________________________
taglib-devel mailing list
taglib-devel@...
https://mail.kde.org/mailman/listinfo/taglib-devel

Re: Bug in Ogg FLAC comment rendering (framing bit added)

by Bugzilla from lalinsky@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 9, 2009 at 11:09 PM, Stephen F. Booth <me@...> wrote:
> 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).

Thanks, I'll read the ogg/flac spec and commit the fix this weekend.
This is a serious bug, so I'll try to release 1.6.1 soon after that.

--
Lukas Lalinsky
lalinsky@...
_______________________________________________
taglib-devel mailing list
taglib-devel@...
https://mail.kde.org/mailman/listinfo/taglib-devel