[FFmpeg-cvslog] lavfi/showspectrum: fix outpicref initialization.
Clément Bœsch
git at videolan.org
Sat Mar 9 23:53:28 CET 2013
ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Sat Mar 9 23:52:30 2013 +0100| [ee0a8bcba145d7dbdcb86c77b93510b7fb7447e1] | committer: Clément Bœsch
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.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee0a8bcba145d7dbdcb86c77b93510b7fb7447e1
---
libavfilter/avf_showspectrum.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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)
More information about the ffmpeg-cvslog
mailing list