+ avio_seek(pb, skip, SEEK_CUR);
+ } else if (st->codec->codec_id == CODEC_ID_ALAC) {
+#define ALAC_PREAMBLE 12
+#define ALAC_HEADER 36
+ if (size < ALAC_PREAMBLE + ALAC_HEADER) {
+ av_log(s, AV_LOG_ERROR, "invalid ALAC magic cookie\n");
+ avio_seek(pb, size, SEEK_CUR);
+ return AVERROR_INVALIDDATA;
+ }
+ avio_seek(pb, ALAC_PREAMBLE, SEEK_CUR);
+ st->codec->extradata = av_mallocz(ALAC_HEADER + FF_INPUT_BUFFER_PADDING_SIZE);
+ if (!st->codec->extradata)
+ return AVERROR(ENOMEM);
+ avio_read(pb, st->codec->extradata, ALAC_HEADER);
+ st->codec->extradata_size = ALAC_HEADER;
+ avio_seek(pb, size - ALAC_PREAMBLE - ALAC_HEADER, SEEK_CUR);