From ef6da7503ac7bd7ffc940fbe17c6c3b92532dee6 Mon Sep 17 00:00:00 2001 From: Roman Artiukhin Date: Sun, 4 Feb 2024 15:53:58 +0200 Subject: Codecs: mp4: Support object type 29 (AAC LC + SBR + PS). Backport libfaad commit https://github.com/knik0/faad2/commit/d35cf8f24d55112451074424f8896e695ce9ee6b Change-Id: I0d637d2be36f5e4bb10d7d09adc442b470e81bf7 --- lib/rbcodec/codecs/libfaad/mp4.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/rbcodec/codecs/libfaad/mp4.c b/lib/rbcodec/codecs/libfaad/mp4.c index 94e1a1daaa..43a4d8da4c 100644 --- a/lib/rbcodec/codecs/libfaad/mp4.c +++ b/lib/rbcodec/codecs/libfaad/mp4.c @@ -113,7 +113,11 @@ static uint8_t ObjectTypesTable[32] = { 0, /* 27 ER Parametric */ #endif 0, /* 28 (Reserved) */ - 0, /* 29 (Reserved) */ +#ifdef PS_DEC + 1, /* 29 AAC LC + SBR + PS */ +#else + 0, /* 29 AAC LC + SBR + PS */ +#endif 0, /* 30 (Reserved) */ 0 /* 31 (Reserved) */ }; @@ -188,7 +192,7 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer, #ifdef SBR_DEC mp4ASC->sbr_present_flag = -1; - if (mp4ASC->objectTypeIndex == 5) + if (mp4ASC->objectTypeIndex == 5 || mp4ASC->objectTypeIndex == 29) { uint8_t tmp; @@ -242,7 +246,7 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer, #ifdef SBR_DEC bits_to_decode = (int8_t)(buffer_size*8 - faad_get_processed_bits(&ld)); - if ((mp4ASC->objectTypeIndex != 5) && (bits_to_decode >= 16)) + if ((mp4ASC->objectTypeIndex != 5 && mp4ASC->objectTypeIndex != 29) && (bits_to_decode >= 16)) { int16_t syncExtensionType = (int16_t)faad_getbits(&ld, 11 DEBUGVAR(1,9,"parse_audio_decoder_specific_info(): syncExtensionType")); -- cgit v1.2.3