aboutsummaryrefslogtreecommitdiff
path: root/decoder/ixheaacd_mps_decorr.c
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/ixheaacd_mps_decorr.c')
-rw-r--r--decoder/ixheaacd_mps_decorr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/decoder/ixheaacd_mps_decorr.c b/decoder/ixheaacd_mps_decorr.c
index 00a0271..910f03a 100644
--- a/decoder/ixheaacd_mps_decorr.c
+++ b/decoder/ixheaacd_mps_decorr.c
@@ -684,6 +684,9 @@ static VOID ixheaacd_ducker_apply_71(
if (ixheaacd_mps_comp(temp3, temp_1, &qtemp, qtemp1)) {
temp_2 = ixheaacd_mps_div_32(temp3, temp_1, &qtemp2);
qtemp2 = qtemp2 + qtemp - qtemp1;
+ if (temp_1 == 0) {
+ qtemp2 = qtemp;
+ }
temp3 = (qtemp2) > 28 ? MAX_32 : 4 << qtemp2;
if (temp_2 > temp3) {
@@ -837,6 +840,9 @@ static VOID ixheaacd_ducker_apply(
if (ixheaacd_mps_comp(temp3, temp_1, &qtemp, qtemp1)) {
temp_2 = ixheaacd_mps_div_32(temp3, temp_1, &qtemp2);
qtemp2 = qtemp2 + qtemp - qtemp1;
+ if (temp_1 == 0) {
+ qtemp2 = qtemp;
+ }
temp3 = qtemp2 > 28 ? MAX_32 : 4 << qtemp2;
if (temp_2 > temp3) {