avfilter/avf_showspectrum: use FF_ARRAY_ELEMS()
authorPaul B Mahol <onemda@gmail.com>
Mon, 28 Dec 2015 22:04:40 +0000 (23:04 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 28 Dec 2015 22:04:40 +0000 (23:04 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/avf_showspectrum.c

index 0e2e84b..55cc668 100644 (file)
@@ -390,7 +390,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples)
                 float y, u, v;
                 int i;
 
-                for (i = 1; i < sizeof(intensity_color_table) / sizeof(*intensity_color_table) - 1; i++)
+                for (i = 1; i < FF_ARRAY_ELEMS(intensity_color_table) - 1; i++)
                     if (intensity_color_table[i].a >= a)
                         break;
                 // i now is the first item >= the color