1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-30 07:48:22 +02:00

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.
This commit is contained in:
Clément Bœsch 2013-03-09 23:52:30 +01:00
parent 22cc8a103c
commit ee0a8bcba1

View File

@ -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)