aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-12-27 14:11:12 +0100
committerPaul B Mahol <onemda@gmail.com>2018-12-27 14:11:12 +0100
commitf266d2ac90c89b5831bcee2e8804e7bad6a6b28d (patch)
tree7165b1c43e0124516ddf4b8a17bcff3f7c011397
parentff0b4d5af78f1d94ea2b29b40b9dd35b0444adfa (diff)
downloadffmpeg-f266d2ac90c89b5831bcee2e8804e7bad6a6b28d.tar.gz
avfilter/af_afir: remove not needed nb_samples from filter context
-rw-r--r--libavfilter/af_afir.c6
-rw-r--r--libavfilter/af_afir.h1
2 files changed, 2 insertions, 5 deletions
diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
index dcaeefa952..bcee3beed8 100644
--- a/libavfilter/af_afir.c
+++ b/libavfilter/af_afir.c
@@ -72,7 +72,7 @@ static int fir_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
block = s->block[ch] + s->part_index * s->block_size;
memset(block, 0, sizeof(*block) * s->fft_length);
- s->fdsp->vector_fmul_scalar(block, src, s->dry_gain, FFALIGN(s->nb_samples, 4));
+ s->fdsp->vector_fmul_scalar(block, src, s->dry_gain, FFALIGN(out->nb_samples, 4));
emms_c();
av_rdft_calc(s->rdft[ch], block);
@@ -121,9 +121,7 @@ static int fir_frame(AudioFIRContext *s, AVFrame *in, AVFilterLink *outlink)
AVFilterContext *ctx = outlink->src;
AVFrame *out = NULL;
- s->nb_samples = in->nb_samples;
-
- out = ff_get_audio_buffer(outlink, s->nb_samples);
+ out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);
diff --git a/libavfilter/af_afir.h b/libavfilter/af_afir.h
index 72d8603100..1889bada4e 100644
--- a/libavfilter/af_afir.h
+++ b/libavfilter/af_afir.h
@@ -62,7 +62,6 @@ typedef struct AudioFIRContext {
int fft_length;
int nb_coef_channels;
int one2many;
- int nb_samples;
RDFTContext **rdft, **irdft;
float **sum;