[FFmpeg-cvslog] alacdec: do not be too strict about the extradata size
Justin Ruggles
git at videolan.org
Thu Jan 17 02:41:28 CET 2013
ffmpeg | branch: release/0.10 | Justin Ruggles <justin.ruggles at gmail.com> | Sat Dec 22 01:21:09 2012 -0500| [77e6676d3eb3a5161f75103180d4ef3f3c8eb5c7] | committer: Reinhard Tartler
alacdec: do not be too strict about the extradata size
Sometimes the extradata has duplicate atoms, but that shouldn't prevent
decoding. Just ensure that it is at least 36 bytes as a sanity check.
CC: libav-stable at libav.org
(cherry picked from commit 68a04b0ccee66f57516e129dd3ec457fd50b4bec)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=77e6676d3eb3a5161f75103180d4ef3f3c8eb5c7
---
libavcodec/alac.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 278cc99..da78908 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -605,10 +605,9 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
alac->avctx = avctx;
/* initialize from the extradata */
- if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) {
- av_log(avctx, AV_LOG_ERROR, "alac: expected %d extradata bytes\n",
- ALAC_EXTRADATA_SIZE);
- return -1;
+ if (alac->avctx->extradata_size < ALAC_EXTRADATA_SIZE) {
+ av_log(avctx, AV_LOG_ERROR, "alac: extradata is too small\n");
+ return AVERROR_INVALIDDATA;
}
if (alac_set_info(alac)) {
av_log(avctx, AV_LOG_ERROR, "alac: set_info failed\n");
More information about the ffmpeg-cvslog
mailing list