Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-08-05 23:40:51 +0400
committerAlex Converse <alex.converse@gmail.com>2011-08-09 23:16:40 +0400
commit94d47382e0558d05e4ba2dd2e3717405d2a703ad (patch)
treeb8446ec5ae975b8215bc63efe7e422a7c3dcf989 /libavcodec/aacdec.c
parent4d58e4cb4ca8e04317fecea432ea3272a445877c (diff)
aac: Don't attempt to output configure an invalid channel configuration.
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r--libavcodec/aacdec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 5740d6cd71..0cae1550fa 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -589,10 +589,11 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
ac->m4ac.chan_config = i;
if (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);
+ int ret = set_default_channel_config(avctx, new_che_pos, ac->m4ac.chan_config);
+ if (!ret)
+ output_configure(ac, ac->che_pos, new_che_pos, ac->m4ac.chan_config, OC_GLOBAL_HDR);
+ else if (avctx->error_recognition >= FF_ER_EXPLODE)
+ return AVERROR_INVALIDDATA;
}
}