summaryrefslogtreecommitdiffstats
path: root/libavfilter/avf_showspectrum.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-21 23:04:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-21 23:11:16 +0200
commit04776cedec8210e859ab96adbee9c41de2dee6b3 (patch)
treeedc8bfacc23ef907609d5b825d58fdae66a17fa9 /libavfilter/avf_showspectrum.c
parent79198cb65a0bff31876f46d9855b88a3d8e2a8a9 (diff)
downloadffmpeg-streaming-04776cedec8210e859ab96adbee9c41de2dee6b3.zip
ffmpeg-streaming-04776cedec8210e859ab96adbee9c41de2dee6b3.tar.gz
avfilter/avf_showspectrum: fix macro ()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avf_showspectrum.c')
-rw-r--r--libavfilter/avf_showspectrum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index fc32834..4a4b4f4 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -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 */
OpenPOWER on IntegriCloud