diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-03-09 23:52:30 +0100 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-03-09 23:52:33 +0100 |
commit | ee0a8bcba145d7dbdcb86c77b93510b7fb7447e1 (patch) | |
tree | c4aefba33f835d8a98fbc3b15c5cdb12810936cd /libavfilter/avf_showspectrum.c | |
parent | 22cc8a103c66283d644c4f4de36b327108fa8244 (diff) | |
download | ffmpeg-streaming-ee0a8bcba145d7dbdcb86c77b93510b7fb7447e1.zip ffmpeg-streaming-ee0a8bcba145d7dbdcb86c77b93510b7fb7447e1.tar.gz |
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/avf_showspectrum.c')
-rw-r--r-- | libavfilter/avf_showspectrum.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index bb8b62f..57b4a4d 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) |