115 if (skip < 0 || !st->codec->extradata ||
122 #define ALAC_PREAMBLE 12
123 #define ALAC_HEADER 36
124 #define ALAC_NEW_KUKI 24
141 if (!memcmp(&preamble[4],
"frmaalac", 8)) {
175 int64_t pos = 0, ccount, num_packets;
181 if (num_packets < 0 || INT32_MAX /
sizeof(
AVIndexEntry) < num_packets)
189 for (i = 0; i < num_packets; i++) {
211 for (i = 0; i < nb_entries; i++) {
264 caf->
data_size = size < 0 ? -1 : size - 4;
292 #define _(x) ((x) >= ' ' ? (x) : ' ')
294 tag,
_(tag>>24),
_((tag>>16)&0xFF),
_((tag>>8)&0xFF),
_(tag&0xFF), size);
303 if (pos + size < pos)
320 "block size or frame size are variable.\n");
334 #define CAF_MAX_PKT_SIZE 4096
341 int res, pkt_size = 0, pkt_frames = 0;
359 if (pkt_size > 0 && pkt_frames == 1) {
361 pkt_size =
FFMIN(pkt_size, left);
375 if (pkt_size == 0 || pkt_frames == 0 || pkt_size > left)
393 int64_t timestamp,
int flags)
397 int64_t pos, packet_cnt, frame_cnt;
399 timestamp =
FFMAX(timestamp, 0);