vf_kerndeint: memset buffer to avoid use of uninitialized memory.

This might fix fate failures.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-06 02:27:22 +01:00
parent 4784a135b2
commit 0ef615126f

View File

@ -98,12 +98,17 @@ static int config_props(AVFilterLink *inlink)
{
KerndeintContext *kerndeint = inlink->dst->priv;
const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[inlink->format];
int ret;
kerndeint->vsub = desc->log2_chroma_h;
kerndeint->pixel_step = av_get_bits_per_pixel(desc) >> 3;
return av_image_alloc(kerndeint->tmp_data, kerndeint->tmp_bwidth,
ret = av_image_alloc(kerndeint->tmp_data, kerndeint->tmp_bwidth,
inlink->w, inlink->h, inlink->format, 1);
if (ret < 0)
return ret;
memset(kerndeint->tmp_data[0], 0, ret);
return 0;
}
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic)