Logo Search packages:      
Sourcecode: libtheora version File versions  Download package

void theora_comment_clear ( theora_comment tc  ) 

Clear an allocated theora_comment struct so that it can be freed.

Parameters:
tc An allocated theora_comment structure.

Definition at line 99 of file comment.c.

References theora_comment::comment_lengths, theora_comment::comments, theora_comment_clear(), theora_comment::user_comments, and theora_comment::vendor.

Referenced by theora_comment_clear().

                                             {
  if(tc){
    long i;
    for(i=0;i<tc->comments;i++)
      if(tc->user_comments[i])_ogg_free(tc->user_comments[i]);
    if(tc->user_comments)_ogg_free(tc->user_comments);
    if(tc->comment_lengths)_ogg_free(tc->comment_lengths);
    if(tc->vendor)_ogg_free(tc->vendor);
  }
  memset(tc,0,sizeof(*tc));
}


Generated by  Doxygen 1.6.0   Back to index