Lines Matching refs:vc
58 void vorbis_comment_init(vorbis_comment *vc){ in vorbis_comment_init() argument
59 memset(vc,0,sizeof(*vc)); in vorbis_comment_init()
74 char *vorbis_comment_query(vorbis_comment *vc, char *tag, int count){ in vorbis_comment_query() argument
83 for(i=0;i<vc->comments;i++){ in vorbis_comment_query()
84 if(!tagcompare(vc->user_comments[i], fulltag, taglen)){ in vorbis_comment_query()
87 return vc->user_comments[i] + taglen; in vorbis_comment_query()
95 int vorbis_comment_query_count(vorbis_comment *vc, char *tag){ in vorbis_comment_query_count() argument
102 for(i=0;i<vc->comments;i++){ in vorbis_comment_query_count()
103 if(!tagcompare(vc->user_comments[i], fulltag, taglen)) in vorbis_comment_query_count()
110 void vorbis_comment_clear(vorbis_comment *vc){ in vorbis_comment_clear() argument
111 if(vc){ in vorbis_comment_clear()
113 for(i=0;i<vc->comments;i++) in vorbis_comment_clear()
114 if(vc->user_comments[i])_ogg_free(vc->user_comments[i]); in vorbis_comment_clear()
115 if(vc->user_comments)_ogg_free(vc->user_comments); in vorbis_comment_clear()
116 if(vc->comment_lengths)_ogg_free(vc->comment_lengths); in vorbis_comment_clear()
117 if(vc->vendor)_ogg_free(vc->vendor); in vorbis_comment_clear()
119 memset(vc,0,sizeof(*vc)); in vorbis_comment_clear()
216 int _vorbis_unpack_comment(vorbis_comment *vc,oggpack_buffer *opb){ in _vorbis_unpack_comment() argument
220 vc->vendor=(char *)_ogg_calloc(vendorlen+1,1); in _vorbis_unpack_comment()
221 if(!vc->vendor)goto err_out; in _vorbis_unpack_comment()
222 _v_readstring(opb,vc->vendor,vendorlen); in _vorbis_unpack_comment()
223 vc->comments=oggpack_read(opb,32); in _vorbis_unpack_comment()
224 if(vc->comments<0)goto err_out; in _vorbis_unpack_comment()
225 vc->user_comments=(char **)_ogg_calloc(vc->comments+1,sizeof(*vc->user_comments)); in _vorbis_unpack_comment()
226 if (!vc->user_comments){ in _vorbis_unpack_comment()
227 vc->comments=0; in _vorbis_unpack_comment()
230 vc->comment_lengths=(int *)_ogg_calloc(vc->comments+1, sizeof(*vc->comment_lengths)); in _vorbis_unpack_comment()
231 if (!vc->comment_lengths)goto err_out; in _vorbis_unpack_comment()
233 for(i=0;i<vc->comments;i++){ in _vorbis_unpack_comment()
236 vc->comment_lengths[i]=len; in _vorbis_unpack_comment()
237 vc->user_comments[i]=(char *)_ogg_calloc(len+1,1); in _vorbis_unpack_comment()
238 if(!vc->user_comments[i])goto err_out; in _vorbis_unpack_comment()
239 _v_readstring(opb,vc->user_comments[i],len); in _vorbis_unpack_comment()
245 vorbis_comment_clear(vc); in _vorbis_unpack_comment()
340 int vorbis_dsp_headerin(vorbis_info *vi,vorbis_comment *vc,ogg_packet *op){ in vorbis_dsp_headerin() argument
376 return(_vorbis_unpack_comment(vc,&opb)); in vorbis_dsp_headerin()
379 if(vi->rate==0 || vc->vendor==NULL){ in vorbis_dsp_headerin()