changeset 7889:fdd3e68dcf94 libavcodec

Cast the return value of get_bits() to signed integer such that the subtraction is conducted as a signed calculation. Patch by Alex Converse (alex converse gmail com)
author superdump
date Thu, 18 Sep 2008 15:35:08 +0000
parents d0489fa75c41
children 20dd4e5e5aa6
files aac.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/aac.c	Thu Sep 18 15:13:15 2008 +0000
+++ b/aac.c	Thu Sep 18 15:35:08 2008 +0000
@@ -979,7 +979,7 @@
     }
 
     sign = get_bits(gb, 1);
-    scale = pow(2., pow(2., get_bits(gb, 2) - 3));
+    scale = pow(2., pow(2., (int)get_bits(gb, 2) - 3));
 
     if ((ret = decode_ics(ac, sce, gb, 0, 0)))
         return ret;