[FFmpeg-devel] [PATCH v3] Add support for Audible AAX (and AAX+) files
Carl Eugen Hoyos
cehoyos at ag.or.at
Sun Jul 12 13:18:59 CEST 2015
Vesselin Bontchev <vesselin.bontchev <at> yandex.com> writes:
[...]
> + unsigned char file_key[20];
Maybe irrelevant but we normally use uint8_t.
> + /* drm blob processing */
> + avio_seek(pb, 0x246, 0);
I did not completely check so sorry if I miss
something but afaict the "blob" is an atom
with name "drm " and should be processed like
all other atoms: Add an entry (or several) to
mov_default_parse_table[] and function(s) that
do not seek but read the atoms with avio_r*(),
avio_read() and avio_seek().
The current solution would not work with pipe
input, this limitation should be avoided if
easily possible.
(And the seeking is ugly.)
> + av_log(c->fc, AV_LOG_FATAL,
> "[aax] drm blob is missing from this file!\n");
> + exit(-1);
This will not be necessary with the atom reading
but in any case, library functions must never
exit(), they simply "return AVERROR_INVALIDDATA;"
> + /* extract activation data */
> + s = getenv("activation_bytes");
As Hendrik wrote, this should be an AVOption,
see the many option at the end of mov.c.
I also hope this will make hexchar2int()
unnecessary.
> + memcpy(key, c->file_key, 16);
> + memcpy(iv, c->file_iv, 16);
Are these necessary?
(Are they changed later on or is it sufficient
to pass the original pointers?)
Thank you for the license change!
Great that you are working on this, Carl Eugen
More information about the ffmpeg-devel
mailing list