Logo Search packages:      
Sourcecode: libtheora version File versions

void theora_comment_add ( theora_comment tc,
char *  comment 
)

Add a comment to an initialized theora_comment structure

Parameters:
comment must be a null-terminated string encoding the comment in "TAG=the value" form

Definition at line 27 of file comment.c.

References theora_comment::comment_lengths, theora_comment::comments, theora_comment_add(), and theora_comment::user_comments.

Referenced by theora_comment_add(), and theora_comment_add_tag().

                                                         {
  tc->user_comments=_ogg_realloc(tc->user_comments,
                            (tc->comments+2)*sizeof(*tc->user_comments));
  tc->comment_lengths=_ogg_realloc(tc->comment_lengths,
                            (tc->comments+2)*sizeof(*tc->comment_lengths));
  tc->comment_lengths[tc->comments]=strlen(comment);
  tc->user_comments[tc->comments]=_ogg_malloc(tc->comment_lengths[tc->comments]+1);
  strcpy(tc->user_comments[tc->comments], comment);
  tc->comments++;
  tc->user_comments[tc->comments]=NULL;
}


Generated by  Doxygen 1.6.0   Back to index