[FFmpeg-cvslog] cafdec: allow larger ALAC magic cookie

Justin Ruggles git at videolan.org
Sat Jul 21 04:53:08 CEST 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Thu Jul 19 19:48:21 2012 -0400| [1749e12f4535d773a442ae6106f9f5d78d4c633c] | committer: Justin Ruggles

cafdec: allow larger ALAC magic cookie

It already skips any extra bytes at the end, and apparently there are some
samples in the wild with larger 'kuki' chunks.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1749e12f4535d773a442ae6106f9f5d78d4c633c
---

 libavformat/cafdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index 6c40b1b..b2eccb9 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -124,7 +124,7 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
 #define ALAC_HEADER   36
 #define ALAC_NEW_KUKI 24
         uint8_t preamble[12];
-        if (size < ALAC_NEW_KUKI || size > ALAC_PREAMBLE + ALAC_HEADER) {
+        if (size < ALAC_NEW_KUKI) {
             av_log(s, AV_LOG_ERROR, "invalid ALAC magic cookie\n");
             avio_skip(pb, size);
             return AVERROR_INVALIDDATA;



More information about the ffmpeg-cvslog mailing list