shithub: aacdec

Download patch

ref: d35cf8f24d55112451074424f8896e695ce9ee6b
parent: c78251b2b5d41ea840fd61ab9502b3d3036bd747
author: Andrew Wesie <[email protected]>
date: Mon Oct 5 02:19:15 EDT 2020

Support object type 29.

Samples from https://www2.iis.fraunhofer.de/AAC/stereo.html.

--- a/libfaad/mp4.c
+++ b/libfaad/mp4.c
@@ -107,7 +107,11 @@
     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) */
 };
@@ -174,7 +178,7 @@
 
 #ifdef SBR_DEC
     mp4ASC->sbr_present_flag = -1;
-    if (mp4ASC->objectTypeIndex == 5)
+    if (mp4ASC->objectTypeIndex == 5 || mp4ASC->objectTypeIndex == 29)
     {
         uint8_t tmp;
 
@@ -231,7 +235,7 @@
     else
 		bits_to_decode = (int8_t)(buffer_size*8 - (startpos-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"));