aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-06-01 10:07:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-06-18 20:53:56 +0200
commit2b70d3941f7a25562c95f522b1c16d388b2cbb27 (patch)
tree1131c4fdf7cbe3ce4581fcd08874a1f6800c3658 /libavcodec
parent6e2b18a895ca3d3df9682bbb313d3d1eaf2d7d1f (diff)
downloadffmpeg-2b70d3941f7a25562c95f522b1c16d388b2cbb27.tar.gz
avcodec/aacenc: Use FLT_EPSILON for lambda minimum
(cherry picked from commit 4b89cf7aa49191c7f8a5ae6e9cf6cfc79ff4ee5e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aacenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 041f242092..a31da877fb 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -853,7 +853,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) {