Message ID | 20200908211856.16290-13-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | a513b306b3bb058f0501a72dd5169dfc39bf73ef |
Headers | show |
Series | [FFmpeg-devel,01/25] avfilter/af_headphone: Don't use uninitialized buffer in log message | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Tue, Sep 08, 2020 at 11:18:44PM +0200, Andreas Rheinhardt wrote: > They seem to exist for an option that was never implemented. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavfilter/af_headphone.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) I would prefer if this is kept. > > diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c > index f9799d8548..f862181cbb 100644 > --- a/libavfilter/af_headphone.c > +++ b/libavfilter/af_headphone.c > @@ -79,8 +79,6 @@ typedef struct HeadphoneContext { > struct headphone_inputs { > AVFrame *frame; > int ir_len; > - int delay_l; > - int delay_r; > int eof; > } *in; > uint64_t mapping[64]; > @@ -457,8 +455,6 @@ static int convert_coeffs(AVFilterContext *ctx, AVFilterLink *inlink) > > for (i = 0; i < s->nb_inputs - 1; i++) { > int len = s->in[i + 1].ir_len; > - int delay_l = s->in[i + 1].delay_l; > - int delay_r = s->in[i + 1].delay_r; > float *ptr; > > ret = ff_inlink_consume_samples(ctx->inputs[i + 1], len, len, &s->in[i + 1].frame); > @@ -490,8 +486,8 @@ static int convert_coeffs(AVFilterContext *ctx, AVFilterLink *inlink) > > offset = idx * n_fft; > for (j = 0; j < len; j++) { > - fft_in_l[delay_l + j].re = ptr[j * 2 ] * gain_lin; > - fft_in_r[delay_r + j].re = ptr[j * 2 + 1] * gain_lin; > + fft_in_l[j].re = ptr[j * 2 ] * gain_lin; > + fft_in_r[j].re = ptr[j * 2 + 1] * gain_lin; > } > > av_fft_permute(s->fft[0], fft_in_l); > @@ -529,8 +525,8 @@ static int convert_coeffs(AVFilterContext *ctx, AVFilterLink *inlink) > > offset = idx * n_fft; > for (j = 0; j < len; j++) { > - fft_in_l[delay_l + j].re = ptr[j * N + I ] * gain_lin; > - fft_in_r[delay_r + j].re = ptr[j * N + I + 1] * gain_lin; > + fft_in_l[j].re = ptr[j * N + I ] * gain_lin; > + fft_in_r[j].re = ptr[j * N + I + 1] * gain_lin; > } > > av_fft_permute(s->fft[0], fft_in_l); > -- > 2.20.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index f9799d8548..f862181cbb 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -79,8 +79,6 @@ typedef struct HeadphoneContext { struct headphone_inputs { AVFrame *frame; int ir_len; - int delay_l; - int delay_r; int eof; } *in; uint64_t mapping[64]; @@ -457,8 +455,6 @@ static int convert_coeffs(AVFilterContext *ctx, AVFilterLink *inlink) for (i = 0; i < s->nb_inputs - 1; i++) { int len = s->in[i + 1].ir_len; - int delay_l = s->in[i + 1].delay_l; - int delay_r = s->in[i + 1].delay_r; float *ptr; ret = ff_inlink_consume_samples(ctx->inputs[i + 1], len, len, &s->in[i + 1].frame); @@ -490,8 +486,8 @@ static int convert_coeffs(AVFilterContext *ctx, AVFilterLink *inlink) offset = idx * n_fft; for (j = 0; j < len; j++) { - fft_in_l[delay_l + j].re = ptr[j * 2 ] * gain_lin; - fft_in_r[delay_r + j].re = ptr[j * 2 + 1] * gain_lin; + fft_in_l[j].re = ptr[j * 2 ] * gain_lin; + fft_in_r[j].re = ptr[j * 2 + 1] * gain_lin; } av_fft_permute(s->fft[0], fft_in_l); @@ -529,8 +525,8 @@ static int convert_coeffs(AVFilterContext *ctx, AVFilterLink *inlink) offset = idx * n_fft; for (j = 0; j < len; j++) { - fft_in_l[delay_l + j].re = ptr[j * N + I ] * gain_lin; - fft_in_r[delay_r + j].re = ptr[j * N + I + 1] * gain_lin; + fft_in_l[j].re = ptr[j * N + I ] * gain_lin; + fft_in_r[j].re = ptr[j * N + I + 1] * gain_lin; } av_fft_permute(s->fft[0], fft_in_l);
They seem to exist for an option that was never implemented. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavfilter/af_headphone.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)