mirror of https://github.com/mstorsjo/fdk-aac.git
Merge "Always call startSelectionProcess() independent on an error in FDK_drcDec_ReadUniDrc()"
This commit is contained in:
commit
358e6d14ac
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue