Commit 49250b58 authored by Wu Jianhua's avatar Wu Jianhua Committed by Lynne

avfilter/vf_blend: fix un-checked potential memory allocation failure

Signed-off-by: 's avatarWu Jianhua <jianhua.wu@intel.com>
parent aa8bb05d
......@@ -279,7 +279,11 @@ static AVFrame *blend_frame(AVFilterContext *ctx, AVFrame *top_buf,
dst_buf = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!dst_buf)
return top_buf;
av_frame_copy_props(dst_buf, top_buf);
if (av_frame_copy_props(dst_buf, top_buf) < 0) {
av_frame_free(&dst_buf);
return top_buf;
}
for (plane = 0; plane < s->nb_planes; plane++) {
int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment