avcodec/aacenc: Use FLT_EPSILON for lambda minimum

This commit is contained in:
Michael Niedermayer 2021-06-01 10:07:05 +02:00
parent 6b1268f8c3
commit 4b89cf7aa4
1 changed files with 1 additions and 1 deletions

View File

@ -853,7 +853,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
/* Not so fast though */ /* Not so fast though */
ratio = sqrtf(ratio); ratio = sqrtf(ratio);
} }
s->lambda = av_clipf(s->lambda * ratio, FLT_MIN, 65536.f); s->lambda = av_clipf(s->lambda * ratio, FLT_EPSILON, 65536.f);
/* Keep iterating if we must reduce and lambda is in the sky */ /* Keep iterating if we must reduce and lambda is in the sky */
if (ratio > 0.9f && ratio < 1.1f) { if (ratio > 0.9f && ratio < 1.1f) {