提交 dfea94ce 编写于 作者: P Paul B Mahol

avfilter/vf_fieldmatch: check ff_insert_inpad() for failure

Signed-off-by: NPaul B Mahol <onemda@gmail.com>
上级 1a58da43
......@@ -904,17 +904,24 @@ static av_cold int fieldmatch_init(AVFilterContext *ctx)
.filter_frame = filter_frame,
.config_props = config_input,
};
int ret;
if (!pad.name)
return AVERROR(ENOMEM);
ff_insert_inpad(ctx, INPUT_MAIN, &pad);
if ((ret = ff_insert_inpad(ctx, INPUT_MAIN, &pad)) < 0) {
av_freep(&pad.name);
return ret;
}
if (fm->ppsrc) {
pad.name = av_strdup("clean_src");
pad.config_props = NULL;
if (!pad.name)
return AVERROR(ENOMEM);
ff_insert_inpad(ctx, INPUT_CLEANSRC, &pad);
if ((ret = ff_insert_inpad(ctx, INPUT_CLEANSRC, &pad)) < 0) {
av_freep(&pad.name);
return ret;
}
}
if ((fm->blockx & (fm->blockx - 1)) ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册