[FFmpeg-devel] [PATCH 2/4] softfloat: use av_normalize1_sf in av_int2sf

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sun Nov 8 00:08:21 CET 2015


Otherwise the aac_fixed decoder triggers av_assert2 in av_mul_sf, when
the input happens to be INT32_MIN.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
 libavutil/softfloat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h
index 5fa5dc0..e87cbf4 100644
--- a/libavutil/softfloat.h
+++ b/libavutil/softfloat.h
@@ -147,7 +147,7 @@ static inline av_const SoftFloat av_sub_sf(SoftFloat a, SoftFloat b){
  * @returns a SoftFloat with value v * 2^frac_bits
  */
 static inline av_const SoftFloat av_int2sf(int v, int frac_bits){
-    return av_normalize_sf((SoftFloat){v, ONE_BITS + 1 - frac_bits});
+    return av_normalize_sf(av_normalize1_sf((SoftFloat){v, ONE_BITS + 1 - frac_bits}));
 }
 
 /**
-- 
2.6.2




More information about the ffmpeg-devel mailing list