On 07/10/2012 06:39 PM, Justin Ruggles wrote: > On 07/09/2012 08:23 PM, Luca Barbato wrote: >> On 07/09/2012 11:23 PM, Justin Ruggles wrote: >>> --- >>> libavformat/cafdec.c | 26 ++++++++++++++++++++++---- >>> 1 files changed, 22 insertions(+), 4 deletions(-) >>> >>> diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c >>> index d5ee9be..0475175 100644 >>> --- a/libavformat/cafdec.c >>> +++ b/libavformat/cafdec.c >>> @@ -121,18 +121,36 @@ static int read_kuki_chunk(AVFormatContext *s, >>> int64_t size) >>> } else if (st->codec->codec_id == CODEC_ID_ALAC) { >>> #define ALAC_PREAMBLE 12 >>> #define ALAC_HEADER 36 >>> - if (size < ALAC_PREAMBLE + ALAC_HEADER) { >>> +#define ALAC_NEW_KUKI 24 >>> + uint8_t preamble[12]; >>> + if (size < 24 || size > 48) { >> >> Probably using ALAC_NEW_KUKI and ALAC_PREAMBLE + ALAC_HEADER would be >> good, the rest seems fine. > > the 48 max actually can be 12 + 36 for the old style or 24 + 24 for the > new style. > > old style kuki: > skip 12 bytes > read 36 bytes > > new style kuki: > fabricate 12 bytes > read 24 bytes > skip 24 bytes, if present
Put a comment or a new define please =) I was totally mislead on that values meaning... lu -- Luca Barbato Gentoo/linux http://dev.gentoo.org/~lu_zero _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel