diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-03-14 20:20:28 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-03-14 20:20:28 +0000 |
commit | 358e6d14ac6048827c4894fa6eb461d4ddac9e3f (patch) | |
tree | e1d8b0b35ecbe3969365c5664feaa5a044cf3be0 /libDRCdec | |
parent | 1f908ac9b0bf42e6485a82a5b0d7d5247fd67f99 (diff) | |
parent | 2bd940425413c735ea78f931250ee1da8ad6691b (diff) | |
download | fdk-aac-358e6d14ac6048827c4894fa6eb461d4ddac9e3f.tar.gz fdk-aac-358e6d14ac6048827c4894fa6eb461d4ddac9e3f.tar.bz2 fdk-aac-358e6d14ac6048827c4894fa6eb461d4ddac9e3f.zip |
Merge "Always call startSelectionProcess() independent on an error in FDK_drcDec_ReadUniDrc()"
Diffstat (limited to 'libDRCdec')
-rw-r--r-- | libDRCdec/src/FDK_drcDecLib.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/libDRCdec/src/FDK_drcDecLib.cpp b/libDRCdec/src/FDK_drcDecLib.cpp index b29b79d..16b8152 100644 --- a/libDRCdec/src/FDK_drcDecLib.cpp +++ b/libDRCdec/src/FDK_drcDecLib.cpp @@ -173,13 +173,11 @@ static int isResetNeeded(HANDLE_DRC_DECODER hDrcDec, return resetNeeded; } -static DRC_DEC_ERROR startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) { - DRC_ERROR dErr = DE_OK; - DRCDEC_SELECTION_PROCESS_RETURN sErr = DRCDEC_SELECTION_PROCESS_NO_ERROR; +static void startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) { int uniDrcConfigHasChanged = 0; SEL_PROC_OUTPUT oldSelProcOutput = hDrcDec->selProcOutput; - if (!hDrcDec->status) return DRC_DEC_NOT_READY; + if (!hDrcDec->status) return; if (hDrcDec->functionalRange & DRC_DEC_SELECTION) { uniDrcConfigHasChanged = hDrcDec->uniDrcConfig.diff; @@ -189,10 +187,9 @@ static DRC_DEC_ERROR startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) { */ hDrcDec->selProcOutput.numSelectedDrcSets = 0; - sErr = drcDec_SelectionProcess_Process( + drcDec_SelectionProcess_Process( hDrcDec->hSelectionProc, &(hDrcDec->uniDrcConfig), &(hDrcDec->loudnessInfoSet), &(hDrcDec->selProcOutput)); - if (sErr) return DRC_DEC_OK; hDrcDec->selProcInputDiff = 0; hDrcDec->uniDrcConfig.diff = 0; @@ -202,15 +199,12 @@ static DRC_DEC_ERROR startSelectionProcess(HANDLE_DRC_DECODER hDrcDec) { if (hDrcDec->functionalRange & DRC_DEC_GAIN) { if (isResetNeeded(hDrcDec, oldSelProcOutput) || uniDrcConfigHasChanged) { - dErr = - drcDec_GainDecoder_Config(hDrcDec->hGainDec, &(hDrcDec->uniDrcConfig), - hDrcDec->selProcOutput.numSelectedDrcSets, - hDrcDec->selProcOutput.selectedDrcSetIds, - hDrcDec->selProcOutput.selectedDownmixIds); - if (dErr) return DRC_DEC_OK; + drcDec_GainDecoder_Config(hDrcDec->hGainDec, &(hDrcDec->uniDrcConfig), + hDrcDec->selProcOutput.numSelectedDrcSets, + hDrcDec->selProcOutput.selectedDrcSetIds, + hDrcDec->selProcOutput.selectedDownmixIds); } } - return DRC_DEC_OK; } DRC_DEC_ERROR @@ -721,9 +715,9 @@ FDK_drcDec_ReadUniDrc(HANDLE_DRC_DECODER hDrcDec, drcDec_GainDecoder_GetFrameSize(hDrcDec->hGainDec), drcDec_GainDecoder_GetDeltaTminDefault(hDrcDec->hGainDec), &(hDrcDec->uniDrcGain)); - if (dErr) return DRC_DEC_NOT_OK; startSelectionProcess(hDrcDec); + if (dErr) return DRC_DEC_NOT_OK; hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD; |