1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/af_afir: fix picking of IR channel

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2018-05-30 12:30:24 +02:00
parent ea0010bf9c
commit d0e740b8fb

View File

@ -230,7 +230,7 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out)
if (!mag || !phase)
goto end;
channel = av_clip(s->ir_channel, 0, s->in[1]->channels);
channel = av_clip(s->ir_channel, 0, s->in[1]->channels - 1);
for (i = 0; i < s->w; i++) {
const float *src = (const float *)s->in[1]->extended_data[channel];
double w = i * M_PI / (s->w - 1);