diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-08-07 23:47:04 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-08-07 23:47:04 +0200 |
commit | 22d13e4290c8fdba57485e1b501f6a92283a10db (patch) | |
tree | bffef47fd691c9e6945fcac7dd66bedf1f905ba8 /libavfilter | |
parent | 571f33de0aa8639b4f9b863e04ee6bcfd4d78070 (diff) | |
download | ffmpeg-22d13e4290c8fdba57485e1b501f6a92283a10db.tar.gz |
avfilter/af_dynaudnorm: use better check for infinite loop
Apparently due to rounding this happens.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_dynaudnorm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c index 6801209231..91ec45a2da 100644 --- a/libavfilter/af_dynaudnorm.c +++ b/libavfilter/af_dynaudnorm.c @@ -519,7 +519,8 @@ static double setup_compress_thresh(double threshold) double step_size = 1.0; while (step_size > DBL_EPSILON) { - while ((current_threshold + step_size > current_threshold) && + while ((llrint((current_threshold + step_size) * (UINT64_C(1) << 63)) > + llrint(current_threshold * (UINT64_C(1) << 63))) && (bound(current_threshold + step_size, 1.0) <= threshold)) { current_threshold += step_size; } |