avfilter/avf_showwaves: fix off by one error in loop condition

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>
pull/94/head
Marton Balint 10 years ago committed by Michael Niedermayer
parent 7ba7277775
commit 86476c510e
  1. 2
      libavfilter/avf_showwaves.c

@ -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;
}

Loading…
Cancel
Save