aboutsummaryrefslogtreecommitdiffstats
path: root/libMpegTPDec/src/tpdec_latm.cpp
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-05-06 07:23:21 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-05-06 07:23:21 +0000
commit2fd44f2027f15c5e141f05245819bf424a44cfa1 (patch)
tree8bf6f33f28355cd7dd6c4f5a01c5324a43ec66bc /libMpegTPDec/src/tpdec_latm.cpp
parentfa5ad13b3761cc0d4cfe3780944eed80fb52d842 (diff)
parent9ab67882eca7454dc001e158bc1e6e2219d6650b (diff)
downloadfdk-aac-2fd44f2027f15c5e141f05245819bf424a44cfa1.tar.gz
fdk-aac-2fd44f2027f15c5e141f05245819bf424a44cfa1.tar.bz2
fdk-aac-2fd44f2027f15c5e141f05245819bf424a44cfa1.zip
Snap for 4765094 from 9ab67882eca7454dc001e158bc1e6e2219d6650b to pi-release
Change-Id: Iecf0e5905c400a1b43555619b5bf7e1823f15f48
Diffstat (limited to 'libMpegTPDec/src/tpdec_latm.cpp')
-rw-r--r--libMpegTPDec/src/tpdec_latm.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/libMpegTPDec/src/tpdec_latm.cpp b/libMpegTPDec/src/tpdec_latm.cpp
index b4f7372..2edf055 100644
--- a/libMpegTPDec/src/tpdec_latm.cpp
+++ b/libMpegTPDec/src/tpdec_latm.cpp
@@ -126,7 +126,6 @@ static TRANSPORTDEC_ERROR CLatmDemux_ReadAudioMuxElement(
CSTpCallBacks *pTpDecCallbacks, CSAudioSpecificConfig *pAsc,
int *pfConfigFound) {
TRANSPORTDEC_ERROR ErrorStatus = TRANSPORTDEC_OK;
- UCHAR applyAsc = pLatmDemux->applyAsc;
if (m_muxConfigPresent) {
pLatmDemux->m_useSameStreamMux = FDKreadBits(bs, 1);
@@ -152,7 +151,12 @@ static TRANSPORTDEC_ERROR CLatmDemux_ReadAudioMuxElement(
goto bail;
}
- if (pLatmDemux->newCfgHasAudioPreRoll) {
+ /* Allow flushing only when audioPreroll functionality is enabled in
+ * current and new config otherwise the new config can be applied
+ * immediately. */
+ if (pAsc->m_sc.m_usacConfig.element[0]
+ .extElement.usacExtElementHasAudioPreRoll &&
+ pLatmDemux->newCfgHasAudioPreRoll) {
pLatmDemux->newCfgHasAudioPreRoll = 0;
/* with audioPreRoll we must flush before applying new cfg */
pLatmDemux->applyAsc = 0;
@@ -223,7 +227,7 @@ static TRANSPORTDEC_ERROR CLatmDemux_ReadAudioMuxElement(
bail:
if (ErrorStatus != TRANSPORTDEC_OK) {
- pLatmDemux->applyAsc = applyAsc;
+ pLatmDemux->applyAsc = 1;
}
return (ErrorStatus);