34 int ret, metadata_last=0, metadata_type, metadata_size, found_streaminfo=0;
56 switch (metadata_type) {
66 if (
avio_read(s->
pb, buffer, metadata_size) != metadata_size) {
80 if (found_streaminfo) {
95 if (si.samplerate > 0) {
104 int i, chapters, track, ti;
105 if (metadata_size < 431)
107 offset = buffer + 395;
108 chapters = bytestream_get_byte(&offset) - 1;
111 for (i = 0; i < chapters; i++) {
112 if (offset + 36 - buffer > metadata_size)
114 start = bytestream_get_be64(&offset);
115 track = bytestream_get_byte(&offset);
119 ti = bytestream_get_byte(&offset);
134 if (!found_streaminfo) {
144 }
else if (ret > 0) {
151 uint64_t
mask = strtol(chmask->
value, NULL, 0);
152 if (!mask || mask & ~0x3ffffULL) {
154 "Invalid value of WAVEFORMATEXTENSIBLE_CHANNEL_MASK\n");
184 int64_t *ppos, int64_t pos_limit)
239 .extensions =
"flac",