+ tag = avio_rl32(pb);
+ if (tag != MKTAG('.', 's', 'n', 'd'))
+ return AVERROR_INVALIDDATA;
+ size = avio_rb32(pb); /* header size */
+ avio_rb32(pb); /* data size */
+
+ id = avio_rb32(pb);
+ rate = avio_rb32(pb);
+ channels = avio_rb32(pb);
+
+ if (size > 24) {
+ /* skip unused data */
+ avio_skip(pb, size - 24);
+ }
+
+ codec = ff_codec_get_id(codec_au_tags, id);
+
+ if (codec == AV_CODEC_ID_NONE) {
+ avpriv_request_sample(s, "unknown or unsupported codec tag: %u", id);
+ return AVERROR_PATCHWELCOME;
+ }
+
+ bps = av_get_bits_per_sample(codec);
+ if (!bps) {
+ avpriv_request_sample(s, "Unknown bits per sample");
+ return AVERROR_PATCHWELCOME;
+ }