avfilter/af_adynamicequalizer: always start filtering from unit gain

This commit is contained in:
Paul B Mahol
2023-11-05 11:47:38 +01:00
parent f9fdaa2ca9
commit 799fad1828
2 changed files with 16 additions and 9 deletions

View File

@@ -43,6 +43,7 @@ typedef struct ChannelContext {
float fstate_float[2];
float gain_float;
float threshold_float;
int init;
} ChannelContext;
typedef struct AudioDynamicEqualizerContext {
@@ -132,6 +133,12 @@ static int config_input(AVFilterLink *inlink)
break;
}
for (int ch = 0; ch < inlink->ch_layout.nb_channels; ch++) {
ChannelContext *cc = &s->cc[ch];
cc->gain_float = 1.f;
cc->gain_double = 1.0;
}
return 0;
}