diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-06 02:27:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-06 02:40:44 +0100 |
commit | 0ef615126fd7807b6fbef5178819655d9b7eb1f9 (patch) | |
tree | fa59d06c25ee9334c7c4c06e0a2cb22d719337b8 /libavfilter/vf_kerndeint.c | |
parent | 4784a135b2b0fe4d1b4c6256bd37265fc45aed3d (diff) | |
download | ffmpeg-0ef615126fd7807b6fbef5178819655d9b7eb1f9.tar.gz |
vf_kerndeint: memset buffer to avoid use of uninitialized memory.
This might fix fate failures.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_kerndeint.c')
-rw-r--r-- | libavfilter/vf_kerndeint.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c index 6cd9bc2ff3..6b87ef6a1f 100644 --- a/libavfilter/vf_kerndeint.c +++ b/libavfilter/vf_kerndeint.c @@ -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) |