Lines Matching refs:seek_table
235 …AC_API FLAC__bool FLAC__format_seektable_is_legal(const FLAC__StreamMetadata_SeekTable *seek_table) in FLAC__format_seektable_is_legal() argument
241 FLAC__ASSERT(0 != seek_table); in FLAC__format_seektable_is_legal()
243 for(i = 0; i < seek_table->num_points; i++) { in FLAC__format_seektable_is_legal()
246 seek_table->points[i].sample_number != FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER && in FLAC__format_seektable_is_legal()
247 seek_table->points[i].sample_number <= prev_sample_number in FLAC__format_seektable_is_legal()
251 prev_sample_number = seek_table->points[i].sample_number; in FLAC__format_seektable_is_legal()
271 FLAC_API unsigned FLAC__format_seektable_sort(FLAC__StreamMetadata_SeekTable *seek_table) in FLAC__format_seektable_sort() argument
276 FLAC__ASSERT(0 != seek_table); in FLAC__format_seektable_sort()
278 if (seek_table->num_points == 0) in FLAC__format_seektable_sort()
282 …qsort(seek_table->points, seek_table->num_points, sizeof(FLAC__StreamMetadata_SeekPoint), (int (*)… in FLAC__format_seektable_sort()
286 for(i = j = 0; i < seek_table->num_points; i++) { in FLAC__format_seektable_sort()
287 if(seek_table->points[i].sample_number != FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER) { in FLAC__format_seektable_sort()
289 if(seek_table->points[i].sample_number == seek_table->points[j-1].sample_number) in FLAC__format_seektable_sort()
294 seek_table->points[j++] = seek_table->points[i]; in FLAC__format_seektable_sort()
297 for(i = j; i < seek_table->num_points; i++) { in FLAC__format_seektable_sort()
298 seek_table->points[i].sample_number = FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER; in FLAC__format_seektable_sort()
299 seek_table->points[i].stream_offset = 0; in FLAC__format_seektable_sort()
300 seek_table->points[i].frame_samples = 0; in FLAC__format_seektable_sort()