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@libav.org
(cherry picked from commit 68a04b0cce
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:

committed by
Reinhard Tartler

parent
884a9b0d29
commit
a39c6bf1b8
@@ -664,10 +664,9 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
|
|||||||
alac->numchannels = alac->avctx->channels;
|
alac->numchannels = alac->avctx->channels;
|
||||||
|
|
||||||
/* initialize from the extradata */
|
/* initialize from the extradata */
|
||||||
if (alac->avctx->extradata_size != ALAC_EXTRADATA_SIZE) {
|
if (alac->avctx->extradata_size < ALAC_EXTRADATA_SIZE) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "alac: expected %d extradata bytes\n",
|
av_log(avctx, AV_LOG_ERROR, "alac: extradata is too small\n");
|
||||||
ALAC_EXTRADATA_SIZE);
|
return AVERROR_INVALIDDATA;
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
if (alac_set_info(alac)) {
|
if (alac_set_info(alac)) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "alac: set_info failed\n");
|
av_log(avctx, AV_LOG_ERROR, "alac: set_info failed\n");
|
||||||
|
Reference in New Issue
Block a user