From ace5ddf259a4cad66be890c6efb3da376ebce737 Mon Sep 17 00:00:00 2001 From: Ramesh Katuri Date: Thu, 30 Aug 2018 15:41:11 +0530 Subject: [PATCH] Fix for crash in aac decode frame This is an erroneous stream in which element is SCE and channel config in general audio header is 2. Added check the handle such erroneous cases Bug:112705708 Test: re-ran poc Change-Id: Ia1f057621ae954f6ae53027301cf6f1f6780011b --- decoder/ixheaacd_api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/decoder/ixheaacd_api.c b/decoder/ixheaacd_api.c index afc4510..65c7517 100644 --- a/decoder/ixheaacd_api.c +++ b/decoder/ixheaacd_api.c @@ -2440,6 +2440,9 @@ IA_ERRORCODE ixheaacd_dec_execute( time_data, channel, p_obj_exhaacplus_dec->aac_config.ui_max_channels, p_state_enhaacplus_dec->audio_object_type); + if(p_state_enhaacplus_dec->ch_config == 2 && channel == 1) + return IA_ENHAACPLUS_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR; + error_code = ixheaacd_aacdec_decodeframe( p_obj_exhaacplus_dec, &aac_scratch_struct, actual_out_buffer, p_obj_exhaacplus_dec->aac_config.frame_status, &type, &ch_idx, 0,