aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-08-28 18:44:17 +0200
committerPaul B Mahol <onemda@gmail.com>2021-08-28 18:52:08 +0200
commit8c1b65feb63e70eaa22c1462163573bea8b91695 (patch)
treea7a2599eab23d9fd649dba4ffbc1144809232780
parent1da2dd5c77ae2b12dcb46d816b6a7f2b10c5c9c6 (diff)
downloadffmpeg-8c1b65feb63e70eaa22c1462163573bea8b91695.tar.gz
avfilter/af_afreqshift: do not forget to update coeffs at runtime
-rw-r--r--libavfilter/af_afreqshift.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/af_afreqshift.c b/libavfilter/af_afreqshift.c
index 90f0c3014e..0410bde70b 100644
--- a/libavfilter/af_afreqshift.c
+++ b/libavfilter/af_afreqshift.c
@@ -321,6 +321,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFrame *out;
ThreadData td;
+ if (s->old_nb_coeffs != s->nb_coeffs)
+ compute_coefs(s->cd, s->cf, s->nb_coeffs * 2, 2. * 20. / inlink->sample_rate);
+ s->old_nb_coeffs = s->nb_coeffs;
+
if (av_frame_is_writable(in)) {
out = in;
} else {