diff options
author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-05-24 07:24:02 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-05-24 07:24:02 -0700 |
commit | 634d4f789cc713fd374db7b9dbcaeb1d89bf2d5e (patch) | |
tree | 4f088dbfd47d22d3f90ebcbcf054a26d6e69bdce /libMpegTPDec/src/tpdec_lib.cpp | |
parent | 57d474b424be58783e7abba469d2f3d800094967 (diff) | |
parent | a4d1f0ad52e2cf6f168d2193216602f52033fc27 (diff) | |
download | fdk-aac-634d4f789cc713fd374db7b9dbcaeb1d89bf2d5e.tar.gz fdk-aac-634d4f789cc713fd374db7b9dbcaeb1d89bf2d5e.tar.bz2 fdk-aac-634d4f789cc713fd374db7b9dbcaeb1d89bf2d5e.zip |
FDKv2 ubsan patches
am: a4d1f0ad52
Change-Id: Ic489768836aae6a9b9cab9e866ecc8b21d819368
Diffstat (limited to 'libMpegTPDec/src/tpdec_lib.cpp')
-rw-r--r-- | libMpegTPDec/src/tpdec_lib.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libMpegTPDec/src/tpdec_lib.cpp b/libMpegTPDec/src/tpdec_lib.cpp index 5eeb7fc..1d8b7b3 100644 --- a/libMpegTPDec/src/tpdec_lib.cpp +++ b/libMpegTPDec/src/tpdec_lib.cpp @@ -1337,9 +1337,9 @@ static TRANSPORTDEC_ERROR transportDec_readStream(HANDLE_TRANSPORTDEC hTp, INT bitDistance, bfDelta; /* Obtain distance to next synch word */ - bitDistance = FDKgetValidBits(hBs); + bitDistance = (INT)FDKgetValidBits(hBs); error = synchronization(hTp, &headerBits); - bitDistance -= FDKgetValidBits(hBs); + bitDistance -= (INT)FDKgetValidBits(hBs); FDK_ASSERT(bitDistance >= 0); @@ -1380,7 +1380,7 @@ static TRANSPORTDEC_ERROR transportDec_readStream(HANDLE_TRANSPORTDEC hTp, int num, denom; /* Obtain estimate of number of lost frames */ - num = hTp->asc[0].m_samplingFrequency * (bfDelta + bitDistance) + + num = (INT)hTp->asc[0].m_samplingFrequency * (bfDelta + bitDistance) + hTp->remainder; denom = hTp->avgBitRate * hTp->asc[0].m_samplesPerFrame; if (num > 0) { |