diff options
Diffstat (limited to 'libDRCdec/src/FDK_drcDecLib.cpp')
-rw-r--r-- | libDRCdec/src/FDK_drcDecLib.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libDRCdec/src/FDK_drcDecLib.cpp b/libDRCdec/src/FDK_drcDecLib.cpp index 4f8ebc7..e43279f 100644 --- a/libDRCdec/src/FDK_drcDecLib.cpp +++ b/libDRCdec/src/FDK_drcDecLib.cpp @@ -145,6 +145,10 @@ struct s_drc_decoder { SEL_PROC_OUTPUT selProcOutput; } DRC_DECODER; +static int _getGainStatus(HANDLE_UNI_DRC_GAIN hUniDrcGain) { + return hUniDrcGain->status; +} + static int isResetNeeded(HANDLE_DRC_DECODER hDrcDec, const SEL_PROC_OUTPUT oldSelProcOutput) { int i, resetNeeded = 0; @@ -729,7 +733,9 @@ FDK_drcDec_ReadUniDrcGain(HANDLE_DRC_DECODER hDrcDec, &(hDrcDec->uniDrcGain)); if (dErr) return DRC_DEC_NOT_OK; - hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD; + if (_getGainStatus(&(hDrcDec->uniDrcGain))) { + hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD; + } return DRC_DEC_OK; } @@ -751,7 +757,9 @@ FDK_drcDec_ReadUniDrc(HANDLE_DRC_DECODER hDrcDec, startSelectionProcess(hDrcDec); if (dErr) return DRC_DEC_NOT_OK; - hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD; + if (_getGainStatus(&(hDrcDec->uniDrcGain))) { + hDrcDec->status = DRC_DEC_NEW_GAIN_PAYLOAD; + } return DRC_DEC_OK; } |