summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavfilter/avf_showspectrum.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index 567ce5d483..5741a1e93d 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -1233,9 +1233,13 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink)
for (chn = 0; chn < (s->mode == SEPARATE ? 1 : s->nb_display_channels); chn++) {
float yf, uf, vf;
int channel = (multi) ? s->nb_display_channels - ch - 1 : chn;
+ float lout[3];
color_range(s, channel, &yf, &uf, &vf);
- pick_color(s, yf, uf, vf, y / (float)h, out);
+ pick_color(s, yf, uf, vf, y / (float)h, lout);
+ out[0] += lout[0];
+ out[1] += lout[1];
+ out[2] += lout[2];
}
memset(s->outpicref->data[0]+(s->start_y + h * (ch + 1) - y - 1) * s->outpicref->linesize[0] + s->w + s->start_x + 20, av_clip_uint8(out[0]), 10);
memset(s->outpicref->data[1]+(s->start_y + h * (ch + 1) - y - 1) * s->outpicref->linesize[1] + s->w + s->start_x + 20, av_clip_uint8(out[1]), 10);