avfilter/vf_decimate: check ff_insert_inpad() for failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -276,17 +276,24 @@ static av_cold int decimate_init(AVFilterContext *ctx)
|
|||||||
.filter_frame = filter_frame,
|
.filter_frame = filter_frame,
|
||||||
.config_props = config_input,
|
.config_props = config_input,
|
||||||
};
|
};
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (!pad.name)
|
if (!pad.name)
|
||||||
return AVERROR(ENOMEM);
|
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) {
|
if (dm->ppsrc) {
|
||||||
pad.name = av_strdup("clean_src");
|
pad.name = av_strdup("clean_src");
|
||||||
pad.config_props = NULL;
|
pad.config_props = NULL;
|
||||||
if (!pad.name)
|
if (!pad.name)
|
||||||
return AVERROR(ENOMEM);
|
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)) ||
|
if ((dm->blockx & (dm->blockx - 1)) ||
|
||||||
|
Reference in New Issue
Block a user