Commit d0e740b8 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/af_afir: fix picking of IR channel

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent ea0010bf
...@@ -230,7 +230,7 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out) ...@@ -230,7 +230,7 @@ static void draw_response(AVFilterContext *ctx, AVFrame *out)
if (!mag || !phase) if (!mag || !phase)
goto end; 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++) { for (i = 0; i < s->w; i++) {
const float *src = (const float *)s->in[1]->extended_data[channel]; const float *src = (const float *)s->in[1]->extended_data[channel];
double w = i * M_PI / (s->w - 1); double w = i * M_PI / (s->w - 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment