[FFmpeg-devel] [libav-devel] [PATCH] aacpsy: avoid norm_fac becoming NaN

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sat Apr 18 22:37:16 CEST 2015

On 18.04.2015 21:46, Luca Barbato wrote:
> On 18/04/15 13:50, Andreas Cadhalpun wrote:
>> Here you can still have 0/0.
> I know, once you get a 0 you get completely out of the previous loop and
> you do not even enter in the other.
> To sum up the problem, a way to tackle it is to calculate the limit of
> that expression and replace with that result whenever you get there.

I'm not sure a unique limit exists here.

> Another neat way is to figure out how many other values are 0 (thus my
> questions about how you get thr set to 0) and skip computation even before.

One could force coeffs[g].ath to be positive, e.g. by always adding a small
value to it. Then band->thr cannot be 0.

> That code needs to be reshaped a bit before even thinking about fixing
> it IMHO.

I think the crash should be fixed before a larger reshaping.

Best regards,

More information about the ffmpeg-devel mailing list