aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libDRCdec/src/drcDec_reader.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/libDRCdec/src/drcDec_reader.cpp b/libDRCdec/src/drcDec_reader.cpp
index e7b3360..a784457 100644
--- a/libDRCdec/src/drcDec_reader.cpp
+++ b/libDRCdec/src/drcDec_reader.cpp
@@ -185,10 +185,18 @@ drcDec_readUniDrc(HANDLE_FDK_BITSTREAM hBs, HANDLE_UNI_DRC_CONFIG hUniDrcConfig,
uniDrcConfigPresent = FDKreadBits(hBs, 1);
if (uniDrcConfigPresent) {
err = drcDec_readUniDrcConfig(hBs, hUniDrcConfig);
- if (err) return err;
+ if (err) {
+ /* clear config, if parsing error occured */
+ FDKmemclear(hUniDrcConfig, sizeof(UNI_DRC_CONFIG));
+ hUniDrcConfig->diff = 1;
+ }
}
err = drcDec_readLoudnessInfoSet(hBs, hLoudnessInfoSet);
- if (err) return err;
+ if (err) {
+ /* clear config, if parsing error occured */
+ FDKmemclear(hLoudnessInfoSet, sizeof(LOUDNESS_INFO_SET));
+ hLoudnessInfoSet->diff = 1;
+ }
}
if (hUniDrcGain != NULL) {