33 int ret, metadata_last=0, metadata_type, metadata_size, found_streaminfo=0;
55 switch (metadata_type) {
65 if (
avio_read(s->
pb, buffer, metadata_size) != metadata_size) {
79 if (found_streaminfo) {
94 if (si.samplerate > 0) {
103 int i, chapters, track, ti;
104 if (metadata_size < 431)
106 offset = buffer + 395;
107 chapters = bytestream_get_byte(&offset) - 1;
110 for (i = 0; i < chapters; i++) {
111 if (offset + 36 - buffer > metadata_size)
113 start = bytestream_get_be64(&offset);
114 track = bytestream_get_byte(&offset);
118 ti = bytestream_get_byte(&offset);
133 if (!found_streaminfo) {
167 .extensions =
"flac",