[FFmpeg-cvslog] avfilter/af_afir: fix picking of IR channel

Paul B Mahol git at videolan.org
Wed May 30 13:32:13 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed May 30 12:30:24 2018 +0200| [d0e740b8fb30f02914594d00eb311a32442a63f8] | committer: Paul B Mahol

avfilter/af_afir: fix picking of IR channel

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d0e740b8fb30f02914594d00eb311a32442a63f8
---

 libavfilter/af_afir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
index cdc7d29e7e..75de14729d 100644
--- a/libavfilter/af_afir.c
+++ b/libavfilter/af_afir.c
@@ -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);



More information about the ffmpeg-cvslog mailing list