aacparse: ADTS header formation is wrong
In funtion gst_aac_parse_prepend_adts_headers()
, channel_configuration
is updated in wrong bit position. As per ADTS format, last bit of adts_headers[2]
and first two bits of adts_headers[3]
specify the channel_configuration. But in function gst_aac_parse_prepend_adts_headers()
, last three bits of adts_headers[2]
are corrupted with channel_configuration
.
Below is the code snippet which can fix this issue.
adts_headers[2] = (profile << 6) | (sampling_frequency_index << 2) | 0x2U | ((channel_configuration & 0x4U) >> 2);