diff options
| author | Fraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de> | 2018-05-04 17:25:53 -0700 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2018-05-04 17:25:53 -0700 |
| commit | 259a3c5bd5eb9be666f40dfb2978502533dd2b82 (patch) | |
| tree | 8bf6f33f28355cd7dd6c4f5a01c5324a43ec66bc /libMpegTPDec/src/tpdec_lib.cpp | |
| parent | df390e34924dd8ccf7d16f5f4781f9da523e225e (diff) | |
| parent | 9ab67882eca7454dc001e158bc1e6e2219d6650b (diff) | |
| download | fdk-aac-259a3c5bd5eb9be666f40dfb2978502533dd2b82.tar.gz fdk-aac-259a3c5bd5eb9be666f40dfb2978502533dd2b82.tar.bz2 fdk-aac-259a3c5bd5eb9be666f40dfb2978502533dd2b82.zip | |
FDKv2 additional fixes
am: 9ab67882ec
Change-Id: Ia2ecfc503d1c2a429ad1c7dd5103263c02691a56
Diffstat (limited to 'libMpegTPDec/src/tpdec_lib.cpp')
| -rw-r--r-- | libMpegTPDec/src/tpdec_lib.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libMpegTPDec/src/tpdec_lib.cpp b/libMpegTPDec/src/tpdec_lib.cpp index 10e3352..306bec0 100644 --- a/libMpegTPDec/src/tpdec_lib.cpp +++ b/libMpegTPDec/src/tpdec_lib.cpp @@ -1151,6 +1151,12 @@ static TRANSPORTDEC_ERROR synchronization(HANDLE_TRANSPORTDEC hTp, &syncLayerFrameBits, &fConfigFound, &headerBits); if (TPDEC_IS_FATAL_ERROR(err)) { + /* Rewind - TPDEC_SYNCSKIP, in order to look for a synch one bit ahead + * next time. Ensure that the bit amount lands at a multiple of + * TPDEC_SYNCSKIP. */ + FDKpushBiDirectional( + hBs, -headerBits + TPDEC_SYNCSKIP + (bitsAvail % TPDEC_SYNCSKIP)); + goto bail; } } |
