57 0xd79e8283acea4620, 0x7a9762f445afd0d8,
58 0x354d60a60b8c79f1, 0x584e1cde00b07aee,
59 0x1573cd93da7df623, 0x47f98d79620dd535
89 av_log(s, level,
"%s: %s\n", name, buf);
100 len =
FFMIN(len, 16);
104 if (r_val != oc->
r_val) {
105 memset(oc->
r_val, 0, 24);
106 memcpy(oc->
r_val, r_val, len);
108 memcpy(&oc->
r_val[16], r_val, 8);
111 if (n_val != oc->
n_val) {
112 memset(oc->
n_val, 0, 24);
113 memcpy(oc->
n_val, n_val, len);
115 memcpy(&oc->
n_val[16], n_val, 8);
121 #define OMA_RPROBE_M_VAL 48 + 1
130 if (!enc_header || !r_val ||
150 return memcmp(&enc_header[pos], oc->
sm_val, 8) ? -1 : 0;
158 uint32_t taglen, datalen;
161 if (!enc_header || !n_val ||
166 if (!memcmp(&enc_header[pos],
"EKB ", 4))
175 taglen =
AV_RB32(&enc_header[pos + 32]);
176 datalen =
AV_RB32(&enc_header[pos + 36]) >> 4;
178 pos += 44LL + taglen;
180 if (pos + (((uint64_t)datalen) << 4) > size)
184 while (datalen-- > 0) {
206 if (!strcmp(em->
tag,
"GEOB") &&
221 "Invalid GEOB data size: %"PRIu32
"\n", geob->
datasize);
240 OMA_ENC_HEADER_SIZE + 48 > geob->
datasize) {
244 oc->
rid =
AV_RB32(&gdata[OMA_ENC_HEADER_SIZE + 28]);
247 memcpy(oc->
iv, &header[0x58], 8);
258 rprobe(
s, gdata, geob->datasize, oc->r_val) < 0 &&
259 nprobe(
s, gdata, geob->datasize, oc->n_val) < 0) {
265 kset(
s, buf, buf, 16);
266 if (!
rprobe(
s, gdata, geob->datasize, oc->r_val) ||
267 !
nprobe(
s, gdata, geob->datasize, oc->n_val))
290 int ret, framesize, jsflag, samplerate;
291 uint32_t codec_params, channel_id;
304 if (memcmp(buf, ((
const uint8_t[]){
'E',
'A',
'3'}), 3) ||
314 if (eid != -1 && eid != -128 &&
decrypt_init(s, extra_meta, buf) < 0) {
321 codec_params =
AV_RB24(&buf[33]);
340 if (samplerate != 44100)
343 framesize = (codec_params & 0x3FF) * 8;
346 jsflag = (codec_params >> 17) & 1;
360 AV_WL32(&edata[2], samplerate);
369 channel_id = (codec_params >> 10) & 7;
372 "Invalid ATRAC-X channel id: %"PRIu32
"\n", channel_id);
377 framesize = ((codec_params & 0x3FF) * 8) + 8;
423 if (ret < packet_size)
442 if (ret == packet_size)
444 (packet_size >> 3), oc->
iv, 1);
446 memset(oc->
iv, 0, 8);
455 unsigned tag_len = 0;
474 int stream_index, int64_t timestamp,
int flags)
495 memset(oc->
iv, 0, 8);
508 .extensions =
"oma,omg,aa3",