56 0xd79e8283acea4620, 0x7a9762f445afd0d8,
57 0x354d60a60b8c79f1, 0x584e1cde00b07aee,
58 0x1573cd93da7df623, 0x47f98d79620dd535
88 av_log(s, level,
"%s: %s\n", name, buf);
103 if (r_val != oc->
r_val) {
104 memset(oc->
r_val, 0, 24);
105 memcpy(oc->
r_val, r_val, len);
107 memcpy(&oc->
r_val[16], r_val, 8);
110 if (n_val != oc->
n_val) {
111 memset(oc->
n_val, 0, 24);
112 memcpy(oc->
n_val, n_val, len);
114 memcpy(&oc->
n_val[16], n_val, 8);
120 #define OMA_RPROBE_M_VAL 48 + 1
129 if (!enc_header || !r_val ||
149 return memcmp(&enc_header[pos], oc->
sm_val, 8) ? -1 : 0;
157 uint32_t taglen, datalen;
160 if (!enc_header || !n_val ||
165 if (!memcmp(&enc_header[pos],
"EKB ", 4))
174 taglen =
AV_RB32(&enc_header[pos + 32]);
175 datalen =
AV_RB32(&enc_header[pos + 36]) >> 4;
179 if (pos + (((uint64_t)datalen) << 4) > size)
183 while (datalen-- > 0) {
205 if (!strcmp(em->
tag,
"GEOB") &&
220 "Invalid GEOB data size: %"PRIu32
"\n", geob->
datasize);
239 OMA_ENC_HEADER_SIZE + 48 > geob->
datasize) {
243 oc->
rid =
AV_RB32(&gdata[OMA_ENC_HEADER_SIZE + 28]);
246 memcpy(oc->
iv, &header[0x58], 8);
257 rprobe(
s, gdata, geob->datasize, oc->r_val) < 0 &&
258 nprobe(
s, gdata, geob->datasize, oc->n_val) < 0) {
264 kset(
s, buf, buf, 16);
265 if (!
rprobe(
s, gdata, geob->datasize, oc->r_val) ||
266 !
nprobe(
s, gdata, geob->datasize, oc->n_val))
289 int ret, framesize, jsflag, samplerate;
290 uint32_t codec_params, channel_id;
303 if (memcmp(buf, ((
const uint8_t[]){
'E',
'A',
'3'}), 3) ||
313 if (eid != -1 && eid != -128 &&
decrypt_init(s, extra_meta, buf) < 0) {
320 codec_params =
AV_RB24(&buf[33]);
339 if (samplerate != 44100)
342 framesize = (codec_params & 0x3FF) * 8;
345 jsflag = (codec_params >> 17) & 1;
359 AV_WL32(&edata[2], samplerate);
368 channel_id = (codec_params >> 10) & 7;
371 "Invalid ATRAC-X channel id: %"PRIu32
"\n", channel_id);
376 framesize = ((codec_params & 0x3FF) * 8) + 8;
419 if (ret < packet_size)
432 if (ret == packet_size)
434 (packet_size >> 3), oc->
iv, 1);
436 memset(oc->
iv, 0, 8);
445 unsigned tag_len = 0;
464 int stream_index, int64_t timestamp,
int flags)
485 memset(oc->
iv, 0, 8);
498 .extensions =
"oma,omg,aa3",