Logo Search packages:      
Sourcecode: libtheora version File versions

char* th_comment_query ( th_comment _tc,
char *  _tag,
int  _count 

Look up a comment value by its tag.

_tc An initialized th_comment structure.
_tag The tag to look up.
_count The instance of the tag. The same tag can appear multiple times, each with a distinct value, so an index is required to retrieve them all. The order in which these values appear is significant and should be preserved. Use th_comment_query_count() to get the legal range for the _count parameter.
A pointer to the queried tag's value. This points directly to data in the th_comment structure. It should not be modified or freed by the application, and modifications to the structure may invalidate the pointer.
Return values:
NULL If no matching tag is found.

Definition at line 86 of file info.c.

References th_comment::comments, and th_comment::user_comments.

Referenced by theora_comment_query().

  long i;
  int  found;
  int  tag_len;
      /*We return a pointer to the data, not a copy.*/
      if(_count==found++)return _tc->user_comments[i]+tag_len+1;
  /*Didn't find anything.*/
  return NULL;

Generated by  Doxygen 1.6.0   Back to index