Lines Matching refs:num_comments
199 for(i = 0; i < object->data.vorbis_comment.num_comments; i++) {
205 static FLAC__StreamMetadata_VorbisComment_Entry *vorbiscomment_entry_array_new_(unsigned num_comments)
207 FLAC__ASSERT(num_comments > 0);
209 return (FLAC__StreamMetadata_VorbisComment_Entry*)safe_calloc_(num_comments, sizeof(FLAC__StreamMetadata_VorbisComment_Entry));
212 static void vorbiscomment_entry_array_delete_(FLAC__StreamMetadata_VorbisComment_Entry *object_array, unsigned num_comments)
216 FLAC__ASSERT(0 != object_array && num_comments > 0);
218 for(i = 0; i < num_comments; i++)
226 static FLAC__StreamMetadata_VorbisComment_Entry *vorbiscomment_entry_array_copy_(const FLAC__StreamMetadata_VorbisComment_Entry *object_array, unsigned num_comments)
231 FLAC__ASSERT(num_comments > 0);
233 return_array = vorbiscomment_entry_array_new_(num_comments);
238 for(i = 0; i < num_comments; i++) {
240 vorbiscomment_entry_array_delete_(return_array, num_comments);
303 for(i = offset; i < object->data.vorbis_comment.num_comments; i++) {
571 if(object->data.vorbis_comment.num_comments == 0) {
577 to->data.vorbis_comment.comments = vorbiscomment_entry_array_copy_(object->data.vorbis_comment.comments, object->data.vorbis_comment.num_comments);
583 to->data.vorbis_comment.num_comments = object->data.vorbis_comment.num_comments;
657 FLAC__ASSERT(object->data.vorbis_comment.num_comments > 0);
658 vorbiscomment_entry_array_delete_(object->data.vorbis_comment.comments, object->data.vorbis_comment.num_comments);
772 if(block1->num_comments != block2->num_comments)
775 for(i = 0; i < block1->num_comments; i++) {
1166 FLAC__ASSERT(object->data.vorbis_comment.num_comments == 0);
1173 const size_t old_size = object->data.vorbis_comment.num_comments * sizeof(FLAC__StreamMetadata_VorbisComment_Entry);
1180 FLAC__ASSERT(object->data.vorbis_comment.num_comments > 0);
1183 if(new_num_comments < object->data.vorbis_comment.num_comments) {
1185 for(i = new_num_comments; i < object->data.vorbis_comment.num_comments; i++)
1199 memset(object->data.vorbis_comment.comments + object->data.vorbis_comment.num_comments, 0, new_size - old_size);
1202 object->data.vorbis_comment.num_comments = new_num_comments;
1211 FLAC__ASSERT(comment_num < object->data.vorbis_comment.num_comments);
1224 FLAC__ASSERT(comment_num <= object->data.vorbis_comment.num_comments);
1231 if(!FLAC__metadata_object_vorbiscomment_resize_comments(object, vc->num_comments+1))
1235 memmove(&vc->comments[comment_num+1], &vc->comments[comment_num], sizeof(FLAC__StreamMetadata_VorbisComment_Entry)*(vc->num_comments-1-comment_num));
1246 return FLAC__metadata_object_vorbiscomment_insert_comment(object, object->data.vorbis_comment.num_comments, entry, copy);
1272 if(all && (index+1 < object->data.vorbis_comment.num_comments)) {
1276 if((unsigned)i < object->data.vorbis_comment.num_comments)
1295 FLAC__ASSERT(comment_num < object->data.vorbis_comment.num_comments);
1304 memmove(&vc->comments[comment_num], &vc->comments[comment_num+1], sizeof(FLAC__StreamMetadata_VorbisComment_Entry)*(vc->num_comments-comment_num-1));
1305 vc->comments[vc->num_comments-1].length = 0;
1306 vc->comments[vc->num_comments-1].entry = 0;
1308 return FLAC__metadata_object_vorbiscomment_resize_comments(object, vc->num_comments-1);
1398 for(i = 0; i < object->data.vorbis_comment.num_comments; i++) {
1421 for(i = (int)object->data.vorbis_comment.num_comments - 1; ok && i >= 0; i--) {