summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-03-09 23:52:30 +0100
committerClément Bœsch <ubitux@gmail.com>2013-03-09 23:52:33 +0100
commitee0a8bcba145d7dbdcb86c77b93510b7fb7447e1 (patch)
treec4aefba33f835d8a98fbc3b15c5cdb12810936cd /libavfilter
parent22cc8a103c66283d644c4f4de36b327108fa8244 (diff)
lavfi/showspectrum: fix outpicref initialization.
In 81f2549, output pixel format was changed from rgb24 to planar yuv, but the initialization was left unchanged. As a result, the chroma planes were left uninitalized. This was not noticed since the current ff_get_video_buffer() seems to be initializing the buffer. This won't be the case anymore after the Evil Plan.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avf_showspectrum.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
index bb8b62f68d..57b4a4d87e 100644
--- a/libavfilter/avf_showspectrum.c
+++ b/libavfilter/avf_showspectrum.c
@@ -226,7 +226,9 @@ static int config_output(AVFilterLink *outlink)
if (!outpicref)
return AVERROR(ENOMEM);
outlink->sample_aspect_ratio = (AVRational){1,1};
- memset(outpicref->data[0], 0, outlink->h * outpicref->linesize[0]);
+ memset(outpicref->data[0], 0, outlink->h * outpicref->linesize[0]);
+ memset(outpicref->data[1], 128, outlink->h * outpicref->linesize[1]);
+ memset(outpicref->data[2], 128, outlink->h * outpicref->linesize[2]);
}
if (showspectrum->xpos >= outlink->w)