54 0xd79e8283acea4620, 0x7a9762f445afd0d8,
55 0x354d60a60b8c79f1, 0x584e1cde00b07aee,
56 0x1573cd93da7df623, 0x47f98d79620dd535
86 av_log(s, level,
"%s: %s\n", name, buf);
101 if (r_val != oc->
r_val) {
102 memset(oc->
r_val, 0, 24);
103 memcpy(oc->
r_val, r_val, len);
105 memcpy(&oc->
r_val[16], r_val, 8);
108 if (n_val != oc->
n_val) {
109 memset(oc->
n_val, 0, 24);
110 memcpy(oc->
n_val, n_val, len);
112 memcpy(&oc->
n_val[16], n_val, 8);
118 #define OMA_RPROBE_M_VAL 48 + 1
127 if (!enc_header || !r_val ||
147 return memcmp(&enc_header[pos], oc->
sm_val, 8) ? -1 : 0;
155 uint32_t taglen, datalen;
158 if (!enc_header || !n_val ||
163 if (!memcmp(&enc_header[pos],
"EKB ", 4))
172 taglen =
AV_RB32(&enc_header[pos + 32]);
173 datalen =
AV_RB32(&enc_header[pos + 36]) >> 4;
177 if (pos + (((uint64_t)datalen) << 4) > size)
181 while (datalen-- > 0) {
203 if (!strcmp(em->
tag,
"GEOB") &&
218 "Invalid GEOB data size: %u\n", geob->
datasize);
237 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;
417 if (ret < packet_size)
430 if (ret == packet_size)
432 (packet_size >> 3), oc->
iv, 1);
434 memset(oc->
iv, 0, 8);
443 unsigned tag_len = 0;
462 int stream_index, int64_t timestamp,
int flags)
483 memset(oc->
iv, 0, 8);
496 .extensions =
"oma,omg,aa3",