aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-06-01 10:07:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-09 22:02:20 +0200
commit162f4df07b49da05fbee93305298b5293569c53f (patch)
tree4b349e76166191c6d8393e93fd7bb14315622b88
parenta7c3cfd8ea15bee839da7fb21e41f58b8fb0db9f (diff)
downloadffmpeg-162f4df07b49da05fbee93305298b5293569c53f.tar.gz
avcodec/aacenc: Use FLT_EPSILON for lambda minimum
(cherry picked from commit 4b89cf7aa49191c7f8a5ae6e9cf6cfc79ff4ee5e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/aacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index f3d6c42e5c..2ede431abe 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -809,7 +809,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
/* Not so fast though */
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 */
if (ratio > 0.9f && ratio < 1.1f) {