diff options
author | Ramesh Katuri <ramesh.katuri@ittiam.com> | 2018-10-23 10:04:03 +0530 |
---|---|---|
committer | Ray Essick <essick@google.com> | 2018-11-14 11:55:32 -0800 |
commit | 9a89ef5bbcca6e4f6c48fb6212d80665ae602d02 (patch) | |
tree | d4714fd2eb0e818020adb2ab732089c5683e64fd /decoder/ixheaacd_decode_main.c | |
parent | 9da98c5ba982818d5ae663699d8adacfda03aa5e (diff) | |
download | libxaac-9a89ef5bbcca6e4f6c48fb6212d80665ae602d02.tar.gz |
Fix for crash in ixheaacd_decode_init
Sampling frequency of the input stream is read from the bit stream.
As per spec there are 30 standard sampling frequencies.Sampling frequency
index which is a 5 bit filed read from the bit stream. If the input
stream has sampling frequency other than this 30 then sampling index
from the bit stream will be 0x1f. If the sampling frequency index is 0x1f
then sampling frequency is directly read from the bit stream (24 bit).
Even though sampling frequency can be any value between ( 0 and 2^24-1)
as per usac specification this free sampling frequency has to be clamped.
We implemented that clamping as part of this CL.
Bug:117047049
Test: poc + vendor
Change-Id: I5793139521563e5efd03c8ed9cf5aeda0792bef2
Diffstat (limited to 'decoder/ixheaacd_decode_main.c')
-rw-r--r-- | decoder/ixheaacd_decode_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/decoder/ixheaacd_decode_main.c b/decoder/ixheaacd_decode_main.c index 844e900..feaa527 100644 --- a/decoder/ixheaacd_decode_main.c +++ b/decoder/ixheaacd_decode_main.c @@ -315,11 +315,16 @@ WORD32 ixheaacd_dec_main(VOID *temp_handle, WORD8 *inbuffer, WORD8 *outbuffer, /* call codec re-configure*/ err = ixheaacd_config( &config_bit_buf, &(pstr_dec_data->str_frame_data - .str_audio_specific_config.str_usac_config), + .str_audio_specific_config.str_usac_config), &(pstr_audio_specific_config ->channel_configuration) /*&pstr_audio_specific_config->str_usac_config*/); if (err != 0) return -1; + pstr_dec_data->str_frame_data.str_audio_specific_config + .sampling_frequency = + pstr_dec_data->str_frame_data.str_audio_specific_config + .str_usac_config.usac_sampling_frequency; + delay = ixheaacd_decode_create( handle, pstr_dec_data, pstr_dec_data->str_frame_data.scal_out_select + 1); |