]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/avf_showspectrum: fix macro ()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Jun 2014 21:04:20 +0000 (23:04 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Jun 2014 21:11:16 +0000 (23:11 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/avf_showspectrum.c

index fc32834e5efbc4fc802c29559a1ffc172abff787..4a4b4f4c7aa56eb221879f5a182bd67db7a9de24 100644 (file)
@@ -323,8 +323,8 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples, int nb
             av_rdft_calc(s->rdft, s->rdft_data[ch]);
 
         /* fill a new spectrum column */
-#define RE(y, ch) s->rdft_data[ch][2 * y + 0]
-#define IM(y, ch) s->rdft_data[ch][2 * y + 1]
+#define RE(y, ch) s->rdft_data[ch][2 * (y) + 0]
+#define IM(y, ch) s->rdft_data[ch][2 * (y) + 1]
 #define MAGNITUDE(y, ch) hypot(RE(y, ch), IM(y, ch))
 
         /* initialize buffer for combining to black */