[FFmpeg-cvslog] avfilter/af_dynaudnorm: fix possible clipping at start when alt-boundary mode is disabled

Paul B Mahol git at videolan.org
Tue Oct 5 16:41:07 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Oct  5 15:21:24 2021 +0200| [fcbaeefb45316b48646f20ae05ece8c16ae7c706] | committer: Paul B Mahol

avfilter/af_dynaudnorm: fix possible clipping at start when alt-boundary mode is disabled

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fcbaeefb45316b48646f20ae05ece8c16ae7c706
---

 libavfilter/af_dynaudnorm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c
index b78b3df85e..62979a5cd0 100644
--- a/libavfilter/af_dynaudnorm.c
+++ b/libavfilter/af_dynaudnorm.c
@@ -471,7 +471,7 @@ static void update_gain_history(DynamicAudioNormalizerContext *s, int channel,
 {
     if (cqueue_empty(s->gain_history_original[channel])) {
         const int pre_fill_size = s->filter_size / 2;
-        const double initial_value = s->alt_boundary_mode ? gain.max_gain : s->peak_value;
+        const double initial_value = s->alt_boundary_mode ? gain.max_gain : FFMIN(1.0, gain.max_gain);
 
         s->prev_amplification_factor[channel] = initial_value;
 



More information about the ffmpeg-cvslog mailing list