diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-03-04 15:52:49 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-03-04 15:52:49 +0100 |
commit | c7f9c2d1d996ac8f67927e9c86b907196ca6a72d (patch) | |
tree | a2dcc8e8cd3df5628f43242243fd475562ea4082 /libMpegTPDec/src/tpdec_lib.cpp | |
parent | f665ac21b355ebc74c951c09b4774936a74fdca0 (diff) | |
parent | 95858d7bd36f19bde4a9595e2bd68f195215b164 (diff) | |
download | fdk-aac-c7f9c2d1d996ac8f67927e9c86b907196ca6a72d.tar.gz fdk-aac-c7f9c2d1d996ac8f67927e9c86b907196ca6a72d.tar.bz2 fdk-aac-c7f9c2d1d996ac8f67927e9c86b907196ca6a72d.zip |
Merge remote-tracking branch 'mstorjo/master' into dabplus2
Diffstat (limited to 'libMpegTPDec/src/tpdec_lib.cpp')
-rw-r--r-- | libMpegTPDec/src/tpdec_lib.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libMpegTPDec/src/tpdec_lib.cpp b/libMpegTPDec/src/tpdec_lib.cpp index 1d8b7b3..1976cb9 100644 --- a/libMpegTPDec/src/tpdec_lib.cpp +++ b/libMpegTPDec/src/tpdec_lib.cpp @@ -736,9 +736,9 @@ static TRANSPORTDEC_ERROR transportDec_AdjustEndOfAccessUnit( hTp->parser.latm.m_audioMuxLengthBytes > 0) { int loasOffset; - loasOffset = (hTp->parser.latm.m_audioMuxLengthBytes * 8 + - FDKgetValidBits(hBs)) - - hTp->globalFramePos; + loasOffset = ((INT)hTp->parser.latm.m_audioMuxLengthBytes * 8 + + (INT)FDKgetValidBits(hBs)) - + (INT)hTp->globalFramePos; if (loasOffset != 0) { FDKpushBiDirectional(hBs, loasOffset); /* For ELD and other payloads there is an unknown amount of padding, @@ -871,7 +871,7 @@ static TRANSPORTDEC_ERROR transportDec_readHeader( int fConfigFound = (pfConfigFound != NULL) ? *pfConfigFound : 0; int startPos; - startPos = FDKgetValidBits(hBs); + startPos = (INT)FDKgetValidBits(hBs); switch (hTp->transportFmt) { case TT_MP4_ADTS: @@ -941,7 +941,7 @@ static TRANSPORTDEC_ERROR transportDec_readHeader( fTraverseMoreFrames = 0; } syncLayerFrameBits = (hTp->parser.adts.bs.frame_length << 3) - - ((INT)startPos - (INT)FDKgetValidBits(hBs)) - + (startPos - (INT)FDKgetValidBits(hBs)) - syncLength; if (syncLayerFrameBits <= 0) { err = TRANSPORTDEC_SYNC_ERROR; @@ -952,10 +952,11 @@ static TRANSPORTDEC_ERROR transportDec_readHeader( break; case TT_MP4_LOAS: if (hTp->numberOfRawDataBlocks <= 0) { - syncLayerFrameBits = FDKreadBits(hBs, 13); + syncLayerFrameBits = (INT)FDKreadBits(hBs, 13); hTp->parser.latm.m_audioMuxLengthBytes = syncLayerFrameBits; syncLayerFrameBits <<= 3; } + FDK_FALLTHROUGH; case TT_MP4_LATM_MCP1: case TT_MP4_LATM_MCP0: if (hTp->numberOfRawDataBlocks <= 0) { @@ -974,7 +975,7 @@ static TRANSPORTDEC_ERROR transportDec_readHeader( hTp->numberOfRawDataBlocks = CLatmDemux_GetNrOfSubFrames(&hTp->parser.latm); if (hTp->transportFmt == TT_MP4_LOAS) { - syncLayerFrameBits -= startPos - FDKgetValidBits(hBs) - (13); + syncLayerFrameBits -= startPos - (INT)FDKgetValidBits(hBs) - (13); } } } else { |