avfilter/dynaudnorm: increment input outside of the FFMIN macro so it doesn't get double incremented

This commit is contained in:
Andy 2017-08-08 22:42:21 +00:00 committed by Paul B Mahol
parent abaeeb3ce0
commit 448c88e1a5

View File

@ -460,7 +460,8 @@ static void update_gain_history(DynamicAudioNormalizerContext *s, int channel,
int input = pre_fill_size;
while (cqueue_size(s->gain_history_minimum[channel]) < pre_fill_size) {
initial_value = FFMIN(initial_value, cqueue_peek(s->gain_history_original[channel], ++input));
input++;
initial_value = FFMIN(initial_value, cqueue_peek(s->gain_history_original[channel], input));
cqueue_enqueue(s->gain_history_minimum[channel], initial_value);
}
}