On Sun, Nov 08, 2015 at 12:08:54AM +0100, Andreas Cadhalpun wrote: > Otherwise (0x20000000, 1) + (0, 33) gives (0, 33), i.e. 1 + 0 = 0. > > This fixes a division by zero in the aac_fixed decoder. > > Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> > --- > libavutil/softfloat.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h > index e87cbf4..fefde8c 100644 > --- a/libavutil/softfloat.h > +++ b/libavutil/softfloat.h > @@ -130,7 +130,9 @@ static inline av_const int av_gt_sf(SoftFloat a, > SoftFloat b) > > static inline av_const SoftFloat av_add_sf(SoftFloat a, SoftFloat b){ > int t= a.exp - b.exp; > - if (t <-31) return b; > + if (a.mant == 0) return b; > + else if (b.mant == 0) return a;
this looks strange 0 should probably have the minimum exponent not 33 now if you want to support denormalized numbers, that is ones that have exponents larger than needed then this patch is not sufficient the same problem would arrise with non 0 mantisses too if their exponents arent minimal [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel