On Sun, Nov 13, 2016 at 09:29:11PM +0100, Andreas Cadhalpun wrote:
> It causes division by zero crashes.
> 
> Signed-off-by: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
> ---
>  libavcodec/aacsbr_fixed.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/libavcodec/aacsbr_fixed.c b/libavcodec/aacsbr_fixed.c
> index b26314a..d2a7027 100644
> --- a/libavcodec/aacsbr_fixed.c
> +++ b/libavcodec/aacsbr_fixed.c
> @@ -429,6 +429,10 @@ static void sbr_gain_calc(AACContext *ac, 
> SpectralBandReplication *sbr,
>                                                  av_add_sf(FLOAT_1, 
> sbr->e_curr[e][m]),
>                                                  av_add_sf(FLOAT_1, 
> sbr->q_mapped[e][m]))));
>                  }
> +                if (sbr->gain[e][m].mant == 0) {
> +                    sbr->gain[e][m] = FLOAT_1;
> +                    sbr->gain[e][m].exp = MIN_EXP;
> +                }

Why is this not not needed for the float code ?
is there a shortcomming in the SoftFloat code ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to