• Home
  • Raw
  • Download

Lines Matching refs:object

164 static void seektable_calculate_length_(FLAC__StreamMetadata *object)  in seektable_calculate_length_()  argument
166 FLAC__ASSERT(object != NULL); in seektable_calculate_length_()
167 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in seektable_calculate_length_()
169 object->length = object->data.seek_table.num_points * FLAC__STREAM_METADATA_SEEKPOINT_LENGTH; in seektable_calculate_length_()
192 static void vorbiscomment_calculate_length_(FLAC__StreamMetadata *object) in vorbiscomment_calculate_length_() argument
196 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); in vorbiscomment_calculate_length_()
198 object->length = (FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN) / 8; in vorbiscomment_calculate_length_()
199 object->length += object->data.vorbis_comment.vendor_string.length; in vorbiscomment_calculate_length_()
200 object->length += (FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN) / 8; in vorbiscomment_calculate_length_()
201 for (i = 0; i < object->data.vorbis_comment.num_comments; i++) { in vorbiscomment_calculate_length_()
202 object->length += (FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN / 8); in vorbiscomment_calculate_length_()
203 object->length += object->data.vorbis_comment.comments[i].length; in vorbiscomment_calculate_length_()
249 static FLAC__bool vorbiscomment_set_entry_(FLAC__StreamMetadata *object, FLAC__StreamMetadata_Vorbi… in vorbiscomment_set_entry_() argument
253 FLAC__ASSERT(object != NULL); in vorbiscomment_set_entry_()
256 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); in vorbiscomment_set_entry_()
290 vorbiscomment_calculate_length_(object); in vorbiscomment_set_entry_()
294 static int vorbiscomment_find_entry_from_(const FLAC__StreamMetadata *object, uint32_t offset, cons… in vorbiscomment_find_entry_from_() argument
298 FLAC__ASSERT(object != NULL); in vorbiscomment_find_entry_from_()
299 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); in vorbiscomment_find_entry_from_()
302 for (i = offset; i < object->data.vorbis_comment.num_comments; i++) { in vorbiscomment_find_entry_from_()
303 …if (FLAC__metadata_object_vorbiscomment_entry_matches(object->data.vorbis_comment.comments[i], fie… in vorbiscomment_find_entry_from_()
310 static void cuesheet_calculate_length_(FLAC__StreamMetadata *object) in cuesheet_calculate_length_() argument
314 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in cuesheet_calculate_length_()
316 object->length = ( in cuesheet_calculate_length_()
324 object->length += object->data.cue_sheet.num_tracks * ( in cuesheet_calculate_length_()
334 for (i = 0; i < object->data.cue_sheet.num_tracks; i++) { in cuesheet_calculate_length_()
335 object->length += object->data.cue_sheet.tracks[i].num_indices * ( in cuesheet_calculate_length_()
396 static FLAC__bool cuesheet_set_track_(FLAC__StreamMetadata *object, FLAC__StreamMetadata_CueSheet_T… in cuesheet_set_track_() argument
400 FLAC__ASSERT(object != NULL); in cuesheet_set_track_()
403 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in cuesheet_set_track_()
419 cuesheet_calculate_length_(object); in cuesheet_set_track_()
432 FLAC__StreamMetadata *object; in FLAC__metadata_object_new() local
437 object = calloc(1, sizeof(FLAC__StreamMetadata)); in FLAC__metadata_object_new()
438 if (object != NULL) { in FLAC__metadata_object_new()
439 object->is_last = false; in FLAC__metadata_object_new()
440 object->type = type; in FLAC__metadata_object_new()
443 object->length = FLAC__STREAM_METADATA_STREAMINFO_LENGTH; in FLAC__metadata_object_new()
451 object->length = FLAC__STREAM_METADATA_APPLICATION_ID_LEN / 8; in FLAC__metadata_object_new()
464 object->data.vorbis_comment.vendor_string.length = (uint32_t)strlen(FLAC__VENDOR_STRING); in FLAC__metadata_object_new()
465 …if (!copy_bytes_(&object->data.vorbis_comment.vendor_string.entry, (const FLAC__byte*)FLAC__VENDOR… in FLAC__metadata_object_new()
466 free(object); in FLAC__metadata_object_new()
469 vorbiscomment_calculate_length_(object); in FLAC__metadata_object_new()
472 cuesheet_calculate_length_(object); in FLAC__metadata_object_new()
475 object->length = ( in FLAC__metadata_object_new()
486 object->data.picture.type = FLAC__STREAM_METADATA_PICTURE_TYPE_OTHER; in FLAC__metadata_object_new()
487 object->data.picture.mime_type = 0; in FLAC__metadata_object_new()
488 object->data.picture.description = 0; in FLAC__metadata_object_new()
498 if (!copy_cstring_(&object->data.picture.mime_type, "")) { in FLAC__metadata_object_new()
499 free(object); in FLAC__metadata_object_new()
502 if (!copy_cstring_((char**)(&object->data.picture.description), "")) { in FLAC__metadata_object_new()
503 free(object->data.picture.mime_type); in FLAC__metadata_object_new()
504 free(object); in FLAC__metadata_object_new()
517 return object; in FLAC__metadata_object_new()
520 FLAC_API FLAC__StreamMetadata *FLAC__metadata_object_clone(const FLAC__StreamMetadata *object) in FLAC__metadata_object_clone() argument
524 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_clone()
526 if ((to = FLAC__metadata_object_new(object->type)) != NULL) { in FLAC__metadata_object_clone()
527 to->is_last = object->is_last; in FLAC__metadata_object_clone()
528 to->type = object->type; in FLAC__metadata_object_clone()
529 to->length = object->length; in FLAC__metadata_object_clone()
532 … memcpy(&to->data.stream_info, &object->data.stream_info, sizeof(FLAC__StreamMetadata_StreamInfo)); in FLAC__metadata_object_clone()
541 …memcpy(&to->data.application.id, &object->data.application.id, FLAC__STREAM_METADATA_APPLICATION_I… in FLAC__metadata_object_clone()
542 …if (!copy_bytes_(&to->data.application.data, object->data.application.data, object->length - FLAC_… in FLAC__metadata_object_clone()
548 to->data.seek_table.num_points = object->data.seek_table.num_points; in FLAC__metadata_object_clone()
553 …((FLAC__byte**)&to->data.seek_table.points, (FLAC__byte*)object->data.seek_table.points, object->d… in FLAC__metadata_object_clone()
563 …if (!copy_vcentry_(&to->data.vorbis_comment.vendor_string, &object->data.vorbis_comment.vendor_str… in FLAC__metadata_object_clone()
567 if (object->data.vorbis_comment.num_comments == 0) { in FLAC__metadata_object_clone()
571 …is_comment.comments = vorbiscomment_entry_array_copy_(object->data.vorbis_comment.comments, object in FLAC__metadata_object_clone()
578 to->data.vorbis_comment.num_comments = object->data.vorbis_comment.num_comments; in FLAC__metadata_object_clone()
581 memcpy(&to->data.cue_sheet, &object->data.cue_sheet, sizeof(FLAC__StreamMetadata_CueSheet)); in FLAC__metadata_object_clone()
582 if (object->data.cue_sheet.num_tracks == 0) { in FLAC__metadata_object_clone()
583 FLAC__ASSERT(object->data.cue_sheet.tracks == NULL); in FLAC__metadata_object_clone()
586 FLAC__ASSERT(object->data.cue_sheet.tracks != 0); in FLAC__metadata_object_clone()
587 …to->data.cue_sheet.tracks = cuesheet_track_array_copy_(object->data.cue_sheet.tracks, object->data… in FLAC__metadata_object_clone()
595 to->data.picture.type = object->data.picture.type; in FLAC__metadata_object_clone()
596 if (!copy_cstring_(&to->data.picture.mime_type, object->data.picture.mime_type)) { in FLAC__metadata_object_clone()
600 …if (!copy_cstring_((char**)(&to->data.picture.description), (const char*)object->data.picture.desc… in FLAC__metadata_object_clone()
604 to->data.picture.width = object->data.picture.width; in FLAC__metadata_object_clone()
605 to->data.picture.height = object->data.picture.height; in FLAC__metadata_object_clone()
606 to->data.picture.depth = object->data.picture.depth; in FLAC__metadata_object_clone()
607 to->data.picture.colors = object->data.picture.colors; in FLAC__metadata_object_clone()
608 to->data.picture.data_length = object->data.picture.data_length; in FLAC__metadata_object_clone()
609 …if (!copy_bytes_((&to->data.picture.data), object->data.picture.data, object->data.picture.data_le… in FLAC__metadata_object_clone()
615 if (!copy_bytes_(&to->data.unknown.data, object->data.unknown.data, object->length)) { in FLAC__metadata_object_clone()
626 void FLAC__metadata_object_delete_data(FLAC__StreamMetadata *object) in FLAC__metadata_object_delete_data() argument
628 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_delete_data()
630 switch(object->type) { in FLAC__metadata_object_delete_data()
635 if (object->data.application.data != NULL) { in FLAC__metadata_object_delete_data()
636 free(object->data.application.data); in FLAC__metadata_object_delete_data()
637 object->data.application.data = NULL; in FLAC__metadata_object_delete_data()
641 if (object->data.seek_table.points != NULL) { in FLAC__metadata_object_delete_data()
642 free(object->data.seek_table.points); in FLAC__metadata_object_delete_data()
643 object->data.seek_table.points = NULL; in FLAC__metadata_object_delete_data()
647 if (object->data.vorbis_comment.vendor_string.entry != NULL) { in FLAC__metadata_object_delete_data()
648 free(object->data.vorbis_comment.vendor_string.entry); in FLAC__metadata_object_delete_data()
649 object->data.vorbis_comment.vendor_string.entry = 0; in FLAC__metadata_object_delete_data()
651 if (object->data.vorbis_comment.comments != NULL) { in FLAC__metadata_object_delete_data()
652 FLAC__ASSERT(object->data.vorbis_comment.num_comments > 0); in FLAC__metadata_object_delete_data()
653 …vorbiscomment_entry_array_delete_(object->data.vorbis_comment.comments, object->data.vorbis_commen… in FLAC__metadata_object_delete_data()
654 object->data.vorbis_comment.comments = NULL; in FLAC__metadata_object_delete_data()
655 object->data.vorbis_comment.num_comments = 0; in FLAC__metadata_object_delete_data()
659 if (object->data.cue_sheet.tracks != NULL) { in FLAC__metadata_object_delete_data()
660 FLAC__ASSERT(object->data.cue_sheet.num_tracks > 0); in FLAC__metadata_object_delete_data()
661 cuesheet_track_array_delete_(object->data.cue_sheet.tracks, object->data.cue_sheet.num_tracks); in FLAC__metadata_object_delete_data()
662 object->data.cue_sheet.tracks = NULL; in FLAC__metadata_object_delete_data()
663 object->data.cue_sheet.num_tracks = 0; in FLAC__metadata_object_delete_data()
667 if (object->data.picture.mime_type != NULL) { in FLAC__metadata_object_delete_data()
668 free(object->data.picture.mime_type); in FLAC__metadata_object_delete_data()
669 object->data.picture.mime_type = NULL; in FLAC__metadata_object_delete_data()
671 if (object->data.picture.description != NULL) { in FLAC__metadata_object_delete_data()
672 free(object->data.picture.description); in FLAC__metadata_object_delete_data()
673 object->data.picture.description = NULL; in FLAC__metadata_object_delete_data()
675 if (object->data.picture.data != NULL) { in FLAC__metadata_object_delete_data()
676 free(object->data.picture.data); in FLAC__metadata_object_delete_data()
677 object->data.picture.data = NULL; in FLAC__metadata_object_delete_data()
681 if (object->data.unknown.data != NULL) { in FLAC__metadata_object_delete_data()
682 free(object->data.unknown.data); in FLAC__metadata_object_delete_data()
683 object->data.unknown.data = NULL; in FLAC__metadata_object_delete_data()
689 FLAC_API void FLAC__metadata_object_delete(FLAC__StreamMetadata *object) in FLAC__metadata_object_delete() argument
691 FLAC__metadata_object_delete_data(object); in FLAC__metadata_object_delete()
692 free(object); in FLAC__metadata_object_delete()
902 FLAC_API FLAC__bool FLAC__metadata_object_application_set_data(FLAC__StreamMetadata *object, FLAC__… in FLAC__metadata_object_application_set_data() argument
906 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_application_set_data()
907 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_APPLICATION); in FLAC__metadata_object_application_set_data()
910 save = object->data.application.data; in FLAC__metadata_object_application_set_data()
914 if (!copy_bytes_(&object->data.application.data, data, length)) in FLAC__metadata_object_application_set_data()
918 object->data.application.data = data; in FLAC__metadata_object_application_set_data()
923 object->length = FLAC__STREAM_METADATA_APPLICATION_ID_LEN / 8 + length; in FLAC__metadata_object_application_set_data()
927 FLAC_API FLAC__bool FLAC__metadata_object_seektable_resize_points(FLAC__StreamMetadata *object, uin… in FLAC__metadata_object_seektable_resize_points() argument
929 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_resize_points()
930 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_resize_points()
932 if (object->data.seek_table.points == 0) { in FLAC__metadata_object_seektable_resize_points()
933 FLAC__ASSERT(object->data.seek_table.num_points == 0); in FLAC__metadata_object_seektable_resize_points()
936 else if ((object->data.seek_table.points = seekpoint_array_new_(new_num_points)) == 0) in FLAC__metadata_object_seektable_resize_points()
940 …const size_t old_size = object->data.seek_table.num_points * sizeof(FLAC__StreamMetadata_SeekPoint… in FLAC__metadata_object_seektable_resize_points()
947 FLAC__ASSERT(object->data.seek_table.num_points > 0); in FLAC__metadata_object_seektable_resize_points()
950 free(object->data.seek_table.points); in FLAC__metadata_object_seektable_resize_points()
951 object->data.seek_table.points = 0; in FLAC__metadata_object_seektable_resize_points()
953 …else if ((object->data.seek_table.points = safe_realloc_(object->data.seek_table.points, new_size)… in FLAC__metadata_object_seektable_resize_points()
959 for (i = object->data.seek_table.num_points; i < new_num_points; i++) { in FLAC__metadata_object_seektable_resize_points()
960 object->data.seek_table.points[i].sample_number = FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER; in FLAC__metadata_object_seektable_resize_points()
961 object->data.seek_table.points[i].stream_offset = 0; in FLAC__metadata_object_seektable_resize_points()
962 object->data.seek_table.points[i].frame_samples = 0; in FLAC__metadata_object_seektable_resize_points()
967 object->data.seek_table.num_points = new_num_points; in FLAC__metadata_object_seektable_resize_points()
969 seektable_calculate_length_(object); in FLAC__metadata_object_seektable_resize_points()
973 FLAC_API void FLAC__metadata_object_seektable_set_point(FLAC__StreamMetadata *object, uint32_t poin… in FLAC__metadata_object_seektable_set_point() argument
975 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_set_point()
976 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_set_point()
977 FLAC__ASSERT(point_num < object->data.seek_table.num_points); in FLAC__metadata_object_seektable_set_point()
979 object->data.seek_table.points[point_num] = point; in FLAC__metadata_object_seektable_set_point()
982 FLAC_API FLAC__bool FLAC__metadata_object_seektable_insert_point(FLAC__StreamMetadata *object, uint… in FLAC__metadata_object_seektable_insert_point() argument
986 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_insert_point()
987 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_insert_point()
988 FLAC__ASSERT(point_num <= object->data.seek_table.num_points); in FLAC__metadata_object_seektable_insert_point()
990 if (!FLAC__metadata_object_seektable_resize_points(object, object->data.seek_table.num_points+1)) in FLAC__metadata_object_seektable_insert_point()
994 for (i = (int)object->data.seek_table.num_points-1; i > (int)point_num; i--) in FLAC__metadata_object_seektable_insert_point()
995 object->data.seek_table.points[i] = object->data.seek_table.points[i-1]; in FLAC__metadata_object_seektable_insert_point()
997 FLAC__metadata_object_seektable_set_point(object, point_num, point); in FLAC__metadata_object_seektable_insert_point()
998 seektable_calculate_length_(object); in FLAC__metadata_object_seektable_insert_point()
1002 FLAC_API FLAC__bool FLAC__metadata_object_seektable_delete_point(FLAC__StreamMetadata *object, uint… in FLAC__metadata_object_seektable_delete_point() argument
1006 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_delete_point()
1007 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_delete_point()
1008 FLAC__ASSERT(point_num < object->data.seek_table.num_points); in FLAC__metadata_object_seektable_delete_point()
1011 for (i = point_num; i < object->data.seek_table.num_points-1; i++) in FLAC__metadata_object_seektable_delete_point()
1012 object->data.seek_table.points[i] = object->data.seek_table.points[i+1]; in FLAC__metadata_object_seektable_delete_point()
1014 return FLAC__metadata_object_seektable_resize_points(object, object->data.seek_table.num_points-1); in FLAC__metadata_object_seektable_delete_point()
1017 FLAC_API FLAC__bool FLAC__metadata_object_seektable_is_legal(const FLAC__StreamMetadata *object) in FLAC__metadata_object_seektable_is_legal() argument
1019 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_is_legal()
1020 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_is_legal()
1022 return FLAC__format_seektable_is_legal(&object->data.seek_table); in FLAC__metadata_object_seektable_is_legal()
1025 …_metadata_object_seektable_template_append_placeholders(FLAC__StreamMetadata *object, uint32_t num) in FLAC__metadata_object_seektable_template_append_placeholders() argument
1027 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_template_append_placeholders()
1028 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_template_append_placeholders()
1032 …return FLAC__metadata_object_seektable_resize_points(object, object->data.seek_table.num_points + … in FLAC__metadata_object_seektable_template_append_placeholders()
1037 …C__metadata_object_seektable_template_append_point(FLAC__StreamMetadata *object, FLAC__uint64 samp… in FLAC__metadata_object_seektable_template_append_point() argument
1041 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_template_append_point()
1042 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_template_append_point()
1044 seek_table = &object->data.seek_table; in FLAC__metadata_object_seektable_template_append_point()
1046 if (!FLAC__metadata_object_seektable_resize_points(object, seek_table->num_points + 1)) in FLAC__metadata_object_seektable_template_append_point()
1056 …__metadata_object_seektable_template_append_points(FLAC__StreamMetadata *object, FLAC__uint64 samp… in FLAC__metadata_object_seektable_template_append_points() argument
1058 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_template_append_points()
1059 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_template_append_points()
1063 FLAC__StreamMetadata_SeekTable *seek_table = &object->data.seek_table; in FLAC__metadata_object_seektable_template_append_points()
1068 if (!FLAC__metadata_object_seektable_resize_points(object, seek_table->num_points + num)) in FLAC__metadata_object_seektable_template_append_points()
1081 …ata_object_seektable_template_append_spaced_points(FLAC__StreamMetadata *object, uint32_t num, FLA… in FLAC__metadata_object_seektable_template_append_spaced_points() argument
1083 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_template_append_spaced_points()
1084 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_template_append_spaced_points()
1088 FLAC__StreamMetadata_SeekTable *seek_table = &object->data.seek_table; in FLAC__metadata_object_seektable_template_append_spaced_points()
1093 if (!FLAC__metadata_object_seektable_resize_points(object, seek_table->num_points + num)) in FLAC__metadata_object_seektable_template_append_spaced_points()
1106 …seektable_template_append_spaced_points_by_samples(FLAC__StreamMetadata *object, uint32_t samples,… in FLAC__metadata_object_seektable_template_append_spaced_points_by_samples() argument
1108 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_template_append_spaced_points_by_samples()
1109 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_template_append_spaced_points_by_samples()
1114 FLAC__StreamMetadata_SeekTable *seek_table = &object->data.seek_table; in FLAC__metadata_object_seektable_template_append_spaced_points_by_samples()
1132 …if (!FLAC__metadata_object_seektable_resize_points(object, seek_table->num_points + (uint32_t)num)) in FLAC__metadata_object_seektable_template_append_spaced_points_by_samples()
1146 FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_sort(FLAC__StreamMetadata *object, FLA… in FLAC__metadata_object_seektable_template_sort() argument
1150 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_seektable_template_sort()
1151 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_SEEKTABLE); in FLAC__metadata_object_seektable_template_sort()
1153 unique = FLAC__format_seektable_sort(&object->data.seek_table); in FLAC__metadata_object_seektable_template_sort()
1155 return !compact || FLAC__metadata_object_seektable_resize_points(object, unique); in FLAC__metadata_object_seektable_template_sort()
1158 …C__metadata_object_vorbiscomment_set_vendor_string(FLAC__StreamMetadata *object, FLAC__StreamMetad… in FLAC__metadata_object_vorbiscomment_set_vendor_string() argument
1162 return vorbiscomment_set_entry_(object, &object->data.vorbis_comment.vendor_string, &entry, copy); in FLAC__metadata_object_vorbiscomment_set_vendor_string()
1165 …LAC__metadata_object_vorbiscomment_resize_comments(FLAC__StreamMetadata *object, uint32_t new_num_… in FLAC__metadata_object_vorbiscomment_resize_comments() argument
1167 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_vorbiscomment_resize_comments()
1168 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); in FLAC__metadata_object_vorbiscomment_resize_comments()
1170 if (object->data.vorbis_comment.comments == NULL) { in FLAC__metadata_object_vorbiscomment_resize_comments()
1171 FLAC__ASSERT(object->data.vorbis_comment.num_comments == 0); in FLAC__metadata_object_vorbiscomment_resize_comments()
1174 …else if ((object->data.vorbis_comment.comments = vorbiscomment_entry_array_new_(new_num_comments))… in FLAC__metadata_object_vorbiscomment_resize_comments()
1178 …const size_t old_size = object->data.vorbis_comment.num_comments * sizeof(FLAC__StreamMetadata_Vor… in FLAC__metadata_object_vorbiscomment_resize_comments()
1185 FLAC__ASSERT(object->data.vorbis_comment.num_comments > 0); in FLAC__metadata_object_vorbiscomment_resize_comments()
1188 if (new_num_comments < object->data.vorbis_comment.num_comments) { in FLAC__metadata_object_vorbiscomment_resize_comments()
1190 for (i = new_num_comments; i < object->data.vorbis_comment.num_comments; i++) in FLAC__metadata_object_vorbiscomment_resize_comments()
1191 if (object->data.vorbis_comment.comments[i].entry != NULL) in FLAC__metadata_object_vorbiscomment_resize_comments()
1192 free(object->data.vorbis_comment.comments[i].entry); in FLAC__metadata_object_vorbiscomment_resize_comments()
1196 free(object->data.vorbis_comment.comments); in FLAC__metadata_object_vorbiscomment_resize_comments()
1197 object->data.vorbis_comment.comments = 0; in FLAC__metadata_object_vorbiscomment_resize_comments()
1200 FLAC__StreamMetadata_VorbisComment_Entry *oldptr = object->data.vorbis_comment.comments; in FLAC__metadata_object_vorbiscomment_resize_comments()
1201 …if ((object->data.vorbis_comment.comments = realloc(object->data.vorbis_comment.comments, new_size… in FLAC__metadata_object_vorbiscomment_resize_comments()
1202 vorbiscomment_entry_array_delete_(oldptr, object->data.vorbis_comment.num_comments); in FLAC__metadata_object_vorbiscomment_resize_comments()
1203 object->data.vorbis_comment.num_comments = 0; in FLAC__metadata_object_vorbiscomment_resize_comments()
1210 …memset(object->data.vorbis_comment.comments + object->data.vorbis_comment.num_comments, 0, new_siz… in FLAC__metadata_object_vorbiscomment_resize_comments()
1213 object->data.vorbis_comment.num_comments = new_num_comments; in FLAC__metadata_object_vorbiscomment_resize_comments()
1215 vorbiscomment_calculate_length_(object); in FLAC__metadata_object_vorbiscomment_resize_comments()
1219 FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_set_comment(FLAC__StreamMetadata *object, u… in FLAC__metadata_object_vorbiscomment_set_comment() argument
1221 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_vorbiscomment_set_comment()
1222 FLAC__ASSERT(comment_num < object->data.vorbis_comment.num_comments); in FLAC__metadata_object_vorbiscomment_set_comment()
1226 …return vorbiscomment_set_entry_(object, &object->data.vorbis_comment.comments[comment_num], &entry… in FLAC__metadata_object_vorbiscomment_set_comment()
1229 FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_insert_comment(FLAC__StreamMetadata *object in FLAC__metadata_object_vorbiscomment_insert_comment() argument
1233 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_vorbiscomment_insert_comment()
1234 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); in FLAC__metadata_object_vorbiscomment_insert_comment()
1235 FLAC__ASSERT(comment_num <= object->data.vorbis_comment.num_comments); in FLAC__metadata_object_vorbiscomment_insert_comment()
1240 vc = &object->data.vorbis_comment; in FLAC__metadata_object_vorbiscomment_insert_comment()
1242 if (!FLAC__metadata_object_vorbiscomment_resize_comments(object, vc->num_comments+1)) in FLAC__metadata_object_vorbiscomment_insert_comment()
1250 return FLAC__metadata_object_vorbiscomment_set_comment(object, comment_num, entry, copy); in FLAC__metadata_object_vorbiscomment_insert_comment()
1253 FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_append_comment(FLAC__StreamMetadata *object in FLAC__metadata_object_vorbiscomment_append_comment() argument
1255 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_vorbiscomment_append_comment()
1256 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); in FLAC__metadata_object_vorbiscomment_append_comment()
1257 …return FLAC__metadata_object_vorbiscomment_insert_comment(object, object->data.vorbis_comment.num_… in FLAC__metadata_object_vorbiscomment_append_comment()
1260 …LAC__metadata_object_vorbiscomment_replace_comment(FLAC__StreamMetadata *object, FLAC__StreamMetad… in FLAC__metadata_object_vorbiscomment_replace_comment() argument
1277 i = vorbiscomment_find_entry_from_(object, 0, (const char *)entry.entry, field_name_length); in FLAC__metadata_object_vorbiscomment_replace_comment()
1280 if (!FLAC__metadata_object_vorbiscomment_set_comment(object, indx, entry, copy)) in FLAC__metadata_object_vorbiscomment_replace_comment()
1282 entry = object->data.vorbis_comment.comments[indx]; in FLAC__metadata_object_vorbiscomment_replace_comment()
1284 if (all && indx < object->data.vorbis_comment.num_comments) { in FLAC__metadata_object_vorbiscomment_replace_comment()
1285 i = vorbiscomment_find_entry_from_(object, indx, (const char *)entry.entry, field_name_length); in FLAC__metadata_object_vorbiscomment_replace_comment()
1288 if (!FLAC__metadata_object_vorbiscomment_delete_comment(object, indx)) in FLAC__metadata_object_vorbiscomment_replace_comment()
1290 if (indx < object->data.vorbis_comment.num_comments) in FLAC__metadata_object_vorbiscomment_replace_comment()
1291 … i = vorbiscomment_find_entry_from_(object, indx, (const char *)entry.entry, field_name_length); in FLAC__metadata_object_vorbiscomment_replace_comment()
1299 return FLAC__metadata_object_vorbiscomment_append_comment(object, entry, copy); in FLAC__metadata_object_vorbiscomment_replace_comment()
1303 FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_delete_comment(FLAC__StreamMetadata *object in FLAC__metadata_object_vorbiscomment_delete_comment() argument
1307 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_vorbiscomment_delete_comment()
1308 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); in FLAC__metadata_object_vorbiscomment_delete_comment()
1309 FLAC__ASSERT(comment_num < object->data.vorbis_comment.num_comments); in FLAC__metadata_object_vorbiscomment_delete_comment()
1311 vc = &object->data.vorbis_comment; in FLAC__metadata_object_vorbiscomment_delete_comment()
1321 return FLAC__metadata_object_vorbiscomment_resize_comments(object, vc->num_comments-1); in FLAC__metadata_object_vorbiscomment_delete_comment()
1390 FLAC_API int FLAC__metadata_object_vorbiscomment_find_entry_from(const FLAC__StreamMetadata *object in FLAC__metadata_object_vorbiscomment_find_entry_from() argument
1394 return vorbiscomment_find_entry_from_(object, offset, field_name, strlen(field_name)); in FLAC__metadata_object_vorbiscomment_find_entry_from()
1397 FLAC_API int FLAC__metadata_object_vorbiscomment_remove_entry_matching(FLAC__StreamMetadata *object in FLAC__metadata_object_vorbiscomment_remove_entry_matching() argument
1402 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_vorbiscomment_remove_entry_matching()
1403 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); in FLAC__metadata_object_vorbiscomment_remove_entry_matching()
1405 for (i = 0; i < object->data.vorbis_comment.num_comments; i++) { in FLAC__metadata_object_vorbiscomment_remove_entry_matching()
1406 …if (FLAC__metadata_object_vorbiscomment_entry_matches(object->data.vorbis_comment.comments[i], fie… in FLAC__metadata_object_vorbiscomment_remove_entry_matching()
1407 if (!FLAC__metadata_object_vorbiscomment_delete_comment(object, i)) in FLAC__metadata_object_vorbiscomment_remove_entry_matching()
1417 …adata_object_vorbiscomment_remove_entries_matching(FLAC__StreamMetadata *object, const char *field… in FLAC__metadata_object_vorbiscomment_remove_entries_matching() argument
1424 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_vorbiscomment_remove_entries_matching()
1425 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT); in FLAC__metadata_object_vorbiscomment_remove_entries_matching()
1428 for (i = (int)object->data.vorbis_comment.num_comments - 1; ok && i >= 0; i--) { in FLAC__metadata_object_vorbiscomment_remove_entries_matching()
1429 …if (FLAC__metadata_object_vorbiscomment_entry_matches(object->data.vorbis_comment.comments[i], fie… in FLAC__metadata_object_vorbiscomment_remove_entries_matching()
1431 ok &= FLAC__metadata_object_vorbiscomment_delete_comment(object, (uint32_t)i); in FLAC__metadata_object_vorbiscomment_remove_entries_matching()
1443 …rack *FLAC__metadata_object_cuesheet_track_clone(const FLAC__StreamMetadata_CueSheet_Track *object) in FLAC__metadata_object_cuesheet_track_clone() argument
1447 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_track_clone()
1450 if (!copy_track_(to, object)) { in FLAC__metadata_object_cuesheet_track_clone()
1459 void FLAC__metadata_object_cuesheet_track_delete_data(FLAC__StreamMetadata_CueSheet_Track *object) in FLAC__metadata_object_cuesheet_track_delete_data() argument
1461 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_track_delete_data()
1463 if (object->indices != NULL) { in FLAC__metadata_object_cuesheet_track_delete_data()
1464 FLAC__ASSERT(object->num_indices > 0); in FLAC__metadata_object_cuesheet_track_delete_data()
1465 free(object->indices); in FLAC__metadata_object_cuesheet_track_delete_data()
1469 …C_API void FLAC__metadata_object_cuesheet_track_delete(FLAC__StreamMetadata_CueSheet_Track *object) in FLAC__metadata_object_cuesheet_track_delete() argument
1471 FLAC__metadata_object_cuesheet_track_delete_data(object); in FLAC__metadata_object_cuesheet_track_delete()
1472 free(object); in FLAC__metadata_object_cuesheet_track_delete()
1475 …LAC__metadata_object_cuesheet_track_resize_indices(FLAC__StreamMetadata *object, uint32_t track_nu… in FLAC__metadata_object_cuesheet_track_resize_indices() argument
1478 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_track_resize_indices()
1479 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in FLAC__metadata_object_cuesheet_track_resize_indices()
1480 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_track_resize_indices()
1482 track = &object->data.cue_sheet.tracks[track_num]; in FLAC__metadata_object_cuesheet_track_resize_indices()
1515 cuesheet_calculate_length_(object); in FLAC__metadata_object_cuesheet_track_resize_indices()
1519 FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_track_insert_index(FLAC__StreamMetadata *object,… in FLAC__metadata_object_cuesheet_track_insert_index() argument
1523 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_track_insert_index()
1524 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in FLAC__metadata_object_cuesheet_track_insert_index()
1525 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_track_insert_index()
1526 FLAC__ASSERT(index_num <= object->data.cue_sheet.tracks[track_num].num_indices); in FLAC__metadata_object_cuesheet_track_insert_index()
1528 track = &object->data.cue_sheet.tracks[track_num]; in FLAC__metadata_object_cuesheet_track_insert_index()
1530 if (!FLAC__metadata_object_cuesheet_track_resize_indices(object, track_num, track->num_indices+1)) in FLAC__metadata_object_cuesheet_track_insert_index()
1537 cuesheet_calculate_length_(object); in FLAC__metadata_object_cuesheet_track_insert_index()
1541 …_metadata_object_cuesheet_track_insert_blank_index(FLAC__StreamMetadata *object, uint32_t track_nu… in FLAC__metadata_object_cuesheet_track_insert_blank_index() argument
1545 return FLAC__metadata_object_cuesheet_track_insert_index(object, track_num, index_num, indx); in FLAC__metadata_object_cuesheet_track_insert_blank_index()
1548 FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_track_delete_index(FLAC__StreamMetadata *object,… in FLAC__metadata_object_cuesheet_track_delete_index() argument
1552 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_track_delete_index()
1553 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in FLAC__metadata_object_cuesheet_track_delete_index()
1554 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_track_delete_index()
1555 FLAC__ASSERT(index_num < object->data.cue_sheet.tracks[track_num].num_indices); in FLAC__metadata_object_cuesheet_track_delete_index()
1557 track = &object->data.cue_sheet.tracks[track_num]; in FLAC__metadata_object_cuesheet_track_delete_index()
1562 FLAC__metadata_object_cuesheet_track_resize_indices(object, track_num, track->num_indices-1); in FLAC__metadata_object_cuesheet_track_delete_index()
1563 cuesheet_calculate_length_(object); in FLAC__metadata_object_cuesheet_track_delete_index()
1567 FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_resize_tracks(FLAC__StreamMetadata *object, uint… in FLAC__metadata_object_cuesheet_resize_tracks() argument
1569 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_resize_tracks()
1570 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in FLAC__metadata_object_cuesheet_resize_tracks()
1572 if (object->data.cue_sheet.tracks == NULL) { in FLAC__metadata_object_cuesheet_resize_tracks()
1573 FLAC__ASSERT(object->data.cue_sheet.num_tracks == 0); in FLAC__metadata_object_cuesheet_resize_tracks()
1576 else if ((object->data.cue_sheet.tracks = cuesheet_track_array_new_(new_num_tracks)) == NULL) in FLAC__metadata_object_cuesheet_resize_tracks()
1580 …const size_t old_size = object->data.cue_sheet.num_tracks * sizeof(FLAC__StreamMetadata_CueSheet_T… in FLAC__metadata_object_cuesheet_resize_tracks()
1587 FLAC__ASSERT(object->data.cue_sheet.num_tracks > 0); in FLAC__metadata_object_cuesheet_resize_tracks()
1590 if (new_num_tracks < object->data.cue_sheet.num_tracks) { in FLAC__metadata_object_cuesheet_resize_tracks()
1592 for (i = new_num_tracks; i < object->data.cue_sheet.num_tracks; i++) in FLAC__metadata_object_cuesheet_resize_tracks()
1593 free(object->data.cue_sheet.tracks[i].indices); in FLAC__metadata_object_cuesheet_resize_tracks()
1597 free(object->data.cue_sheet.tracks); in FLAC__metadata_object_cuesheet_resize_tracks()
1598 object->data.cue_sheet.tracks = 0; in FLAC__metadata_object_cuesheet_resize_tracks()
1600 …else if ((object->data.cue_sheet.tracks = safe_realloc_(object->data.cue_sheet.tracks, new_size)) … in FLAC__metadata_object_cuesheet_resize_tracks()
1605 … memset(object->data.cue_sheet.tracks + object->data.cue_sheet.num_tracks, 0, new_size - old_size); in FLAC__metadata_object_cuesheet_resize_tracks()
1608 object->data.cue_sheet.num_tracks = new_num_tracks; in FLAC__metadata_object_cuesheet_resize_tracks()
1610 cuesheet_calculate_length_(object); in FLAC__metadata_object_cuesheet_resize_tracks()
1614 FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_set_track(FLAC__StreamMetadata *object, uint32_t… in FLAC__metadata_object_cuesheet_set_track() argument
1616 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_set_track()
1617 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_set_track()
1619 return cuesheet_set_track_(object, object->data.cue_sheet.tracks + track_num, track, copy); in FLAC__metadata_object_cuesheet_set_track()
1622 FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_insert_track(FLAC__StreamMetadata *object, uint3… in FLAC__metadata_object_cuesheet_insert_track() argument
1626 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_insert_track()
1627 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in FLAC__metadata_object_cuesheet_insert_track()
1628 FLAC__ASSERT(track_num <= object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_insert_track()
1630 cs = &object->data.cue_sheet; in FLAC__metadata_object_cuesheet_insert_track()
1632 if (!FLAC__metadata_object_cuesheet_resize_tracks(object, cs->num_tracks+1)) in FLAC__metadata_object_cuesheet_insert_track()
1640 return FLAC__metadata_object_cuesheet_set_track(object, track_num, track, copy); in FLAC__metadata_object_cuesheet_insert_track()
1643 FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_insert_blank_track(FLAC__StreamMetadata *object,… in FLAC__metadata_object_cuesheet_insert_blank_track() argument
1647 return FLAC__metadata_object_cuesheet_insert_track(object, track_num, &track, /*copy=*/false); in FLAC__metadata_object_cuesheet_insert_blank_track()
1650 FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_delete_track(FLAC__StreamMetadata *object, uint3… in FLAC__metadata_object_cuesheet_delete_track() argument
1654 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_delete_track()
1655 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in FLAC__metadata_object_cuesheet_delete_track()
1656 FLAC__ASSERT(track_num < object->data.cue_sheet.num_tracks); in FLAC__metadata_object_cuesheet_delete_track()
1658 cs = &object->data.cue_sheet; in FLAC__metadata_object_cuesheet_delete_track()
1668 return FLAC__metadata_object_cuesheet_resize_tracks(object, cs->num_tracks-1); in FLAC__metadata_object_cuesheet_delete_track()
1671 FLAC_API FLAC__bool FLAC__metadata_object_cuesheet_is_legal(const FLAC__StreamMetadata *object, FLA… in FLAC__metadata_object_cuesheet_is_legal() argument
1673 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_is_legal()
1674 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in FLAC__metadata_object_cuesheet_is_legal()
1676 return FLAC__format_cuesheet_is_legal(&object->data.cue_sheet, check_cd_da_subset, violation); in FLAC__metadata_object_cuesheet_is_legal()
1704 …I FLAC__uint32 FLAC__metadata_object_cuesheet_calculate_cddb_id(const FLAC__StreamMetadata *object) in FLAC__metadata_object_cuesheet_calculate_cddb_id() argument
1708 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_cuesheet_calculate_cddb_id()
1709 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_CUESHEET); in FLAC__metadata_object_cuesheet_calculate_cddb_id()
1711 cs = &object->data.cue_sheet; in FLAC__metadata_object_cuesheet_calculate_cddb_id()
1726 FLAC_API FLAC__bool FLAC__metadata_object_picture_set_mime_type(FLAC__StreamMetadata *object, char … in FLAC__metadata_object_picture_set_mime_type() argument
1731 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_picture_set_mime_type()
1732 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_PICTURE); in FLAC__metadata_object_picture_set_mime_type()
1735 old = object->data.picture.mime_type; in FLAC__metadata_object_picture_set_mime_type()
1743 …if (!copy_bytes_((FLAC__byte**)(&object->data.picture.mime_type), (FLAC__byte*)mime_type, new_leng… in FLAC__metadata_object_picture_set_mime_type()
1747 object->data.picture.mime_type = mime_type; in FLAC__metadata_object_picture_set_mime_type()
1752 object->length -= old_length; in FLAC__metadata_object_picture_set_mime_type()
1753 object->length += new_length; in FLAC__metadata_object_picture_set_mime_type()
1757 FLAC_API FLAC__bool FLAC__metadata_object_picture_set_description(FLAC__StreamMetadata *object, FLA… in FLAC__metadata_object_picture_set_description() argument
1762 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_picture_set_description()
1763 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_PICTURE); in FLAC__metadata_object_picture_set_description()
1766 old = object->data.picture.description; in FLAC__metadata_object_picture_set_description()
1774 if (!copy_bytes_(&object->data.picture.description, description, new_length+1)) in FLAC__metadata_object_picture_set_description()
1778 object->data.picture.description = description; in FLAC__metadata_object_picture_set_description()
1783 object->length -= old_length; in FLAC__metadata_object_picture_set_description()
1784 object->length += new_length; in FLAC__metadata_object_picture_set_description()
1788 FLAC_API FLAC__bool FLAC__metadata_object_picture_set_data(FLAC__StreamMetadata *object, FLAC__byte… in FLAC__metadata_object_picture_set_data() argument
1792 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_picture_set_data()
1793 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_PICTURE); in FLAC__metadata_object_picture_set_data()
1796 old = object->data.picture.data; in FLAC__metadata_object_picture_set_data()
1800 if (!copy_bytes_(&object->data.picture.data, data, length)) in FLAC__metadata_object_picture_set_data()
1804 object->data.picture.data = data; in FLAC__metadata_object_picture_set_data()
1809 object->length -= object->data.picture.data_length; in FLAC__metadata_object_picture_set_data()
1810 object->data.picture.data_length = length; in FLAC__metadata_object_picture_set_data()
1811 object->length += length; in FLAC__metadata_object_picture_set_data()
1815 FLAC_API FLAC__bool FLAC__metadata_object_picture_is_legal(const FLAC__StreamMetadata *object, cons… in FLAC__metadata_object_picture_is_legal() argument
1817 FLAC__ASSERT(object != NULL); in FLAC__metadata_object_picture_is_legal()
1818 FLAC__ASSERT(object->type == FLAC__METADATA_TYPE_PICTURE); in FLAC__metadata_object_picture_is_legal()
1820 return FLAC__format_picture_is_legal(&object->data.picture, violation); in FLAC__metadata_object_picture_is_legal()