summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fieldmatch.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2017-08-25 10:20:13 +0200
committerPaul B Mahol <onemda@gmail.com>2017-08-25 10:20:13 +0200
commitdfea94ce994a916eb7c1a278a09748fd3928c00d (patch)
tree133160f45ff1aafa335896e54c49f1716211cb93 /libavfilter/vf_fieldmatch.c
parent1a58da434ad0e8ba0167c4066e3dc7980c7b2804 (diff)
avfilter/vf_fieldmatch: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_fieldmatch.c')
-rw-r--r--libavfilter/vf_fieldmatch.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c
index 17402158d4..3694f26d33 100644
--- a/libavfilter/vf_fieldmatch.c
+++ b/libavfilter/vf_fieldmatch.c
@@ -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)) ||