summaryrefslogtreecommitdiff
path: root/libavfilter/af_dynaudnorm.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-01-04 19:10:06 +0100
committerPaul B Mahol <onemda@gmail.com>2020-01-04 19:34:50 +0100
commit389865352de8fe7cc46241e8c2843a46a776acdf (patch)
tree4ab3049e70023be635e7f3b042e41101ebc4e1f3 /libavfilter/af_dynaudnorm.c
parentc8253cb3328421b3825787e2e2f853ffe1128aa9 (diff)
downloadffmpeg-389865352de8fe7cc46241e8c2843a46a776acdf.tar.gz
avfilter/af_dynaudnorm: fix another clipping with custom peak value
This always happened at start with alternative boundary mode disabled. The clipping only occurred if starting samples where high enough.
Diffstat (limited to 'libavfilter/af_dynaudnorm.c')
-rw-r--r--libavfilter/af_dynaudnorm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c
index 1330433fbc..27c13bf424 100644
--- a/libavfilter/af_dynaudnorm.c
+++ b/libavfilter/af_dynaudnorm.c
@@ -477,7 +477,7 @@ static void update_gain_history(DynamicAudioNormalizerContext *s, int channel,
if (cqueue_empty(s->gain_history_original[channel]) ||
cqueue_empty(s->gain_history_minimum[channel])) {
const int pre_fill_size = s->filter_size / 2;
- const double initial_value = s->alt_boundary_mode ? gain.max_gain : 1.0;
+ const double initial_value = s->alt_boundary_mode ? gain.max_gain : s->peak_value;
s->prev_amplification_factor[channel] = initial_value;