diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-08-25 10:23:21 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-08-25 10:23:21 +0200 |
commit | 0b940c95b2171cb1035c79b85492f5f6cdb060a6 (patch) | |
tree | 4143550cfb81eee0c2cb61e9247b9c4314f00a10 /libavfilter | |
parent | dfea94ce994a916eb7c1a278a09748fd3928c00d (diff) | |
download | ffmpeg-0b940c95b2171cb1035c79b85492f5f6cdb060a6.tar.gz |
avfilter/vf_decimate: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_decimate.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c index f9a40f2d4c..53347c7f10 100644 --- a/libavfilter/vf_decimate.c +++ b/libavfilter/vf_decimate.c @@ -276,17 +276,24 @@ static av_cold int decimate_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 (dm->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 ((dm->blockx & (dm->blockx - 1)) || |