[Vorbis-dev] Delete / replace comments?

David M. Cotter dave at kjams.com
Wed Jan 31 13:52:17 PST 2007


pretty, pretty, *pretty* please, wish sugar on top, and a free Mac  
Karaoke app for good measure, does *anybody* have a clue or a tip or  
an idea on this?

On Jan 29, 2007, at 9:21 PM, David M. Cotter wrote:

> I've tried for a while now to delete and/or replace some comments  
> in a file.
> I'm using the vcedit.c code
>
> here's what I try:
>
> //	open the file and get access to comments
> vcedit_open(i_vcStateP, i_fileP);
> i_commentsP = vcedit_comments(i_vcStateP);
>
> //	now delete all existing comments
> vorbis_comment_clear(i_commentsP);
> vorbis_comment_init(i_commentsP);
>
> //	now in here add some new comments
> vorbis_comment_add_tag(
> 	i_commentsP,
> 	const_cast<char *>(Key_CommonToCustom(common)),
> 	const_cast<char *>(str.utf8Z()));
>
> //	now update the changes
> vcedit_write(i_vcStateP, i_fileP);
> vcedit_clear(i_vcStateP);
>
> however, all this seems to do is APPEND comments, rather that  
> delete and create new ones.
>
> how the heck do I delete the old comments??



More information about the Vorbis-dev mailing list