diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-09-15 16:54:16 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-09-15 16:54:16 +0200 |
commit | 97182034e8829014bdfc0449c2116d629196f1d4 (patch) | |
tree | 6c3f4e3ef63d33aa16c79e530b46382faf0ab406 /libMpegTPDec | |
parent | bafe5616b88cc52f9f0ded6403a6b3ec68d8c27c (diff) | |
parent | 3a831a5fbc990c83e9b5b804a082bb158364e793 (diff) | |
download | fdk-aac-97182034e8829014bdfc0449c2116d629196f1d4.tar.gz fdk-aac-97182034e8829014bdfc0449c2116d629196f1d4.tar.bz2 fdk-aac-97182034e8829014bdfc0449c2116d629196f1d4.zip |
Merge remote-tracking branch 'mstorjo/master' into dabplus2
Diffstat (limited to 'libMpegTPDec')
-rw-r--r-- | libMpegTPDec/src/tpdec_asc.cpp | 13 | ||||
-rw-r--r-- | libMpegTPDec/src/tpdec_lib.cpp | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp index 28bc22d..8868b22 100644 --- a/libMpegTPDec/src/tpdec_asc.cpp +++ b/libMpegTPDec/src/tpdec_asc.cpp @@ -1325,7 +1325,7 @@ static TRANSPORTDEC_ERROR EldSpecificConfig_Parse(CSAudioSpecificConfig *asc, CSTpCallBacks *cb) { TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK; CSEldSpecificConfig *esc = &asc->m_sc.m_eldSpecificConfig; - ASC_ELD_EXT_TYPE eldExtType; + int eldExtType; int eldExtLen, len, cnt, ldSbrLen = 0, eldExtLenSum, numSbrHeader = 0, sbrIndex; @@ -1395,7 +1395,7 @@ static TRANSPORTDEC_ERROR EldSpecificConfig_Parse(CSAudioSpecificConfig *asc, esc->m_downscaledSamplingFrequency = asc->m_samplingFrequency; /* parse ExtTypeConfigData */ while ( - ((eldExtType = (ASC_ELD_EXT_TYPE)FDKreadBits(hBs, 4)) != ELDEXT_TERM) && + ((eldExtType = FDKreadBits(hBs, 4)) != ELDEXT_TERM) && ((INT)FDKgetValidBits(hBs) >= 0)) { eldExtLen = len = FDKreadBits(hBs, 4); if (len == 0xf) { @@ -1546,8 +1546,7 @@ static TRANSPORTDEC_ERROR extElementConfig(CSUsacExtElementConfig *extElement, const AUDIO_OBJECT_TYPE aot) { TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK; - USAC_EXT_ELEMENT_TYPE usacExtElementType = - (USAC_EXT_ELEMENT_TYPE)escapedValue(hBs, 4, 8, 16); + int usacExtElementType = escapedValue(hBs, 4, 8, 16); /* recurve extension elements which are invalid for USAC */ if (aot == AOT_USAC) { @@ -1564,7 +1563,7 @@ static TRANSPORTDEC_ERROR extElementConfig(CSUsacExtElementConfig *extElement, } } - extElement->usacExtElementType = usacExtElementType; + extElement->usacExtElementType = (USAC_EXT_ELEMENT_TYPE) usacExtElementType; int usacExtElementConfigLength = escapedValue(hBs, 4, 8, 16); extElement->usacExtElementConfigLength = (USHORT)usacExtElementConfigLength; INT bsAnchor; @@ -1628,14 +1627,14 @@ static TRANSPORTDEC_ERROR configExtension(CSUsacConfig *usc, TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK; int numConfigExtensions; - CONFIG_EXT_ID usacConfigExtType; + int usacConfigExtType; int usacConfigExtLength; numConfigExtensions = (int)escapedValue(hBs, 2, 4, 8) + 1; for (int confExtIdx = 0; confExtIdx < numConfigExtensions; confExtIdx++) { INT nbits; int loudnessInfoSetConfigExtensionPosition = FDKgetValidBits(hBs); - usacConfigExtType = (CONFIG_EXT_ID)escapedValue(hBs, 4, 8, 16); + usacConfigExtType = escapedValue(hBs, 4, 8, 16); usacConfigExtLength = (int)escapedValue(hBs, 4, 8, 16); /* Start bit position of config extension */ diff --git a/libMpegTPDec/src/tpdec_lib.cpp b/libMpegTPDec/src/tpdec_lib.cpp index 1976cb9..506aed3 100644 --- a/libMpegTPDec/src/tpdec_lib.cpp +++ b/libMpegTPDec/src/tpdec_lib.cpp @@ -274,7 +274,7 @@ TRANSPORTDEC_ERROR transportDec_OutOfBandConfig(HANDLE_TRANSPORTDEC hTp, UCHAR configChanged = 0; UCHAR configMode = AC_CM_DET_CFG_CHANGE; - UCHAR tmpConf[1024]; + UCHAR tmpConf[1024] = {0}; if (length > 1024) { return TRANSPORTDEC_UNSUPPORTED_FORMAT; } |