53 0xd79e8283acea4620, 0x7a9762f445afd0d8,
54 0x354d60a60b8c79f1, 0x584e1cde00b07aee,
55 0x1573cd93da7df623, 0x47f98d79620dd535
85 av_log(s, level,
"%s: %s\n", name, buf);
100 if (r_val != oc->
r_val) {
101 memset(oc->
r_val, 0, 24);
102 memcpy(oc->
r_val, r_val, len);
104 memcpy(&oc->
r_val[16], r_val, 8);
107 if (n_val != oc->
n_val) {
108 memset(oc->
n_val, 0, 24);
109 memcpy(oc->
n_val, n_val, len);
111 memcpy(&oc->
n_val[16], n_val, 8);
117 #define OMA_RPROBE_M_VAL 48 + 1
126 if (!enc_header || !r_val ||
127 size < OMA_ENC_HEADER_SIZE + oc->k_size + oc->
e_size + oc->
i_size ||
146 return memcmp(&enc_header[pos], oc->
sm_val, 8) ? -1 : 0;
154 uint32_t taglen, datalen;
157 if (!enc_header || !n_val ||
158 size < OMA_ENC_HEADER_SIZE + oc->k_size + 4)
162 if (!memcmp(&enc_header[pos],
"EKB ", 4))
171 taglen =
AV_RB32(&enc_header[pos + 32]);
172 datalen =
AV_RB32(&enc_header[pos + 36]) >> 4;
176 if (pos + (((uint64_t)datalen) << 4) > size)
180 while (datalen-- > 0) {
202 if (!strcmp(em->
tag,
"GEOB") &&
217 "Invalid GEOB data size: %u\n", geob->
datasize);
236 || OMA_ENC_HEADER_SIZE + 48 > geob->
datasize
241 oc->
rid =
AV_RB32(&gdata[OMA_ENC_HEADER_SIZE + 28]);
244 memcpy(oc->
iv, &header[0x58], 8);
255 rprobe(
s, gdata, geob->datasize, oc->r_val) < 0 &&
256 nprobe(
s, gdata, geob->datasize, oc->n_val) < 0) {
262 kset(
s, buf, buf, 16);
263 if (!
rprobe(
s, gdata, geob->datasize, oc->r_val) ||
264 !
nprobe(
s, gdata, geob->datasize, oc->n_val))
287 int ret, framesize, jsflag, samplerate;
288 uint32_t codec_params, channel_id;
301 if (memcmp(buf, ((
const uint8_t[]){
'E',
'A',
'3'}), 3) ||
311 if (eid != -1 && eid != -128 &&
decrypt_init(s, extra_meta, buf) < 0) {
318 codec_params =
AV_RB24(&buf[33]);
337 if (samplerate != 44100)
340 framesize = (codec_params & 0x3FF) * 8;
343 jsflag = (codec_params >> 17) & 1;
357 AV_WL32(&edata[2], samplerate);
366 channel_id = (codec_params >> 10) & 7;
369 "Invalid ATRAC-X channel id: %d\n", channel_id);
374 framesize = ((codec_params & 0x3FF) * 8) + 8;
418 if (ret < packet_size)
431 if (ret == packet_size)
433 (packet_size >> 3), oc->
iv, 1);
435 memset(oc->
iv, 0, 8);
444 unsigned tag_len = 0;
470 int stream_index, int64_t timestamp,
int flags)
491 memset(oc->
iv, 0, 8);
504 .extensions =
"oma,omg,aa3",