[FFmpeg-devel] [PATCH] Add support for Audible AA files

wm4 nfxjfg at googlemail.com
Mon Jul 27 13:28:47 CEST 2015


On Mon, 27 Jul 2015 01:33:49 +0300
Vesselin Bontchev <vesselin.bontchev at yandex.com> wrote:

> From ba73543efc3fdc4b5c61e9cb56f998d748716e00 Mon Sep 17 00:00:00 2001
> From: Vesselin Bontchev <vesselin.bontchev at yandex.com>
> Date: Sun, 19 Jul 2015 23:16:36 +0200
> Subject: [PATCH] Add support for Audible AA files
> 
> https://en.wikipedia.org/wiki/Audible.com#Quality
> ---


> +        if (!strncmp(key, "HeaderKey", 9)) {
> +            j = 0;
> +            for (idx = 0; idx < 4; idx++) {
> +                c->HeaderKey.part[idx] = (uint32_t)atoi(val +  j);
> +                c->HeaderKey.part[idx] = AV_RB32(c->HeaderKey.part + idx); // convert to BE!

> +    memcpy(output + 2, &c->HeaderKey, 16);

That seems very questionable. You basically read it as big endian 32 bit
value and hash the value in host endian order. Is this really what's
intended? Maybe you should just convert it back to a byte array with
explicit AV_WL32() calls (if the intention is to simply swap the byte
order before hashing).


More information about the ffmpeg-devel mailing list