avfilter/avf_showwaves: fix off by one error in loop condition
authorMarton Balint <cus@passwd.hu>
Sun, 9 Nov 2014 13:19:36 +0000 (14:19 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 9 Nov 2014 15:44:10 +0000 (16:44 +0100)
It caused segfaults.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/avf_showwaves.c

index 4cd225a..fa34a52 100644 (file)
@@ -157,7 +157,7 @@ inline static int push_frame(AVFilterLink *outlink)
         showwaves->req_fullfilled = 1;
     showwaves->outpicref = NULL;
     showwaves->buf_idx = 0;
-    for (i = 0; i <= nb_channels; i++)
+    for (i = 0; i < nb_channels; i++)
         showwaves->buf_idy[i] = 0;
     return ret;
 }