116 if (skip < 0 || !st->codec->extradata ||
123 #define ALAC_PREAMBLE 12
124 #define ALAC_HEADER 36
125 #define ALAC_NEW_KUKI 24
141 if (!memcmp(&preamble[4],
"frmaalac", 8)) {
171 int64_t pos = 0, ccount, num_packets;
177 if (num_packets < 0 || INT32_MAX /
sizeof(
AVIndexEntry) < num_packets)
185 for (i = 0; i < num_packets; i++) {
207 for (i = 0; i < nb_entries && !
avio_feof(pb); i++) {
260 caf->
data_size = size < 0 ? -1 : size - 4;
288 #define _(x) ((x) >= ' ' ? (x) : ' ')
290 "skipping CAF chunk: %08"PRIX32
" (%c%c%c%c), size %"PRId64
"\n",
291 tag,
_(tag>>24),
_((tag>>16)&0xFF),
_((tag>>8)&0xFF),
_(tag&0xFF), size);
300 if (pos > INT64_MAX - size)
317 "block size or frame size are variable.\n");
331 #define CAF_MAX_PKT_SIZE 4096
338 int res, pkt_size = 0, pkt_frames = 0;
356 if (pkt_size > 0 && pkt_frames == 1) {
358 pkt_size =
FFMIN(pkt_size, left);
372 if (pkt_size == 0 || pkt_frames == 0 || pkt_size > left)
390 int64_t timestamp,
int flags)
394 int64_t pos, packet_cnt, frame_cnt;
396 timestamp =
FFMAX(timestamp, 0);