diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2013-08-27 16:17:45 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2013-08-27 16:17:45 -0700 |
commit | 2ddc922da87bb675b8ab8c305566436e806df0d9 (patch) | |
tree | 37bc76089aabffd8f8d71f2fe2c87b2ae1a2dc13 /libMpegTPDec | |
parent | 3a0a695565d1d360f9a82173469c8ef858bc08a0 (diff) | |
download | ODR-AudioEnc-2ddc922da87bb675b8ab8c305566436e806df0d9.tar.gz ODR-AudioEnc-2ddc922da87bb675b8ab8c305566436e806df0d9.tar.bz2 ODR-AudioEnc-2ddc922da87bb675b8ab8c305566436e806df0d9.zip |
Decode parametric stereo even with invalid channel config
AAC decoder: Allow decoding of Parametric Stereo (AOT 29) bitstreams
with invalid channel config 2.
Bug 9428126
Change-Id: I1e8b801dfc0e6b1706421342d4985512e83f0dbe
Diffstat (limited to 'libMpegTPDec')
-rw-r--r-- | libMpegTPDec/include/tpdec_lib.h | 2 | ||||
-rw-r--r-- | libMpegTPDec/src/tpdec_asc.cpp | 10 | ||||
-rw-r--r-- | libMpegTPDec/src/version | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/libMpegTPDec/include/tpdec_lib.h b/libMpegTPDec/include/tpdec_lib.h index 7a5aa1c..5cec91d 100644 --- a/libMpegTPDec/include/tpdec_lib.h +++ b/libMpegTPDec/include/tpdec_lib.h @@ -206,7 +206,7 @@ void CProgramConfig_Read ( CProgramConfig *pPce, */ int CProgramConfig_LookupElement( CProgramConfig *pPce, - const UINT channelConfig, + UINT channelConfig, const UINT tag, const UINT channelIdx, UCHAR chMapping[], diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp index 679808d..e6278d6 100644 --- a/libMpegTPDec/src/tpdec_asc.cpp +++ b/libMpegTPDec/src/tpdec_asc.cpp @@ -267,7 +267,7 @@ void getImplicitAudioChannelTypeAndIndex( int CProgramConfig_LookupElement( CProgramConfig *pPce, - const UINT channelConfig, + UINT channelConfig, const UINT tag, const UINT channelIdx, UCHAR chMapping[], @@ -289,7 +289,13 @@ int CProgramConfig_LookupElement( *elMapping = pPce->elCounter; if (elList[pPce->elCounter] != elType) { /* Not in the list */ - return 0; + if ( (channelConfig == 2) && (elType == ID_SCE) ) + { /* This scenario occurs with HE-AAC v2 streams of buggy encoders. + Due to other decoder implementations decoding of these kind of streams is desired. */ + channelConfig = 1; + } else { + return 0; + } } /* Assume all front channels */ getImplicitAudioChannelTypeAndIndex(&chType[channelIdx], &chIndex[channelIdx], channelConfig, channelIdx); diff --git a/libMpegTPDec/src/version b/libMpegTPDec/src/version index e7bd1b1..d998903 100644 --- a/libMpegTPDec/src/version +++ b/libMpegTPDec/src/version @@ -2,7 +2,7 @@ /* library info */ #define TP_LIB_VL0 2 #define TP_LIB_VL1 3 -#define TP_LIB_VL2 0 +#define TP_LIB_VL2 1 #define TP_LIB_TITLE "MPEG Transport" #define TP_LIB_BUILD_DATE __DATE__ #define TP_LIB_BUILD_TIME __TIME__ |