summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/aacdec.c4
-rw-r--r--libavcodec/avcodec.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 927d4314fa..7589bd7e7b 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -591,7 +591,9 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
ac->m4ac.chan_config = i;
if (ac->m4ac.chan_config) {
- set_default_channel_config(avctx, new_che_pos, ac->m4ac.chan_config);
+ if (set_default_channel_config(avctx, new_che_pos, ac->m4ac.chan_config) < 0 &&
+ avctx->error_recognition >= FF_ER_EXPLODE)
+ return AVERROR_INVALIDDATA;
output_configure(ac, ac->che_pos, new_che_pos, ac->m4ac.chan_config, OC_GLOBAL_HDR);
}
}
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 2a438ccc13..b2a8e4c33e 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1487,7 +1487,7 @@ typedef struct AVCodecContext {
float b_quant_offset;
/**
- * Error recognization; higher values will detect more errors but may
+ * Error recognition; higher values will detect more errors but may
* misdetect some more or less valid parts as errors.
* - encoding: unused
* - decoding: Set by user.