shithub: aacenc

Download patch

ref: 223d5ee4d92c52b61863739dd3bf633806643f81
parent: 167170d01b188e5a6b59cf2e2fb20177417c0d50
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sun Aug 8 15:27:31 EDT 2021

fix a crash

--- a/libfaac/blockswitch.c
+++ b/libfaac/blockswitch.c
@@ -102,7 +102,7 @@
               volchg += fabs(eng[sfb] - lasteng[sfb]);
           }
 
-          if ((volchg / toteng * quality) > 3.0)
+          if (toteng != 0.0 && (volchg / toteng * quality) > 3.0)
           {
               psyInfo->block_type = ONLY_SHORT_WINDOW;
               break;