aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-15 05:13:11 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-17 16:17:26 +0200
commit10ad3cd7982e5a5d922cabd176c97571a7684c60 (patch)
tree6bbae4d98825a85c75765577b2d8b5b3e04e294c /libavfilter
parent54d201ae20d37e1ff5b2fba502fb82e23f090ddb (diff)
downloadffmpeg-10ad3cd7982e5a5d922cabd176c97571a7684c60.tar.gz
avfilter/avfilter: Actually error out on init error
Currently an error from init could be overwritten by successfully setting the enable expression. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfilter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index c614eb0740..ce63b9762f 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -924,6 +924,8 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
ret = ctx->filter->init(ctx);
else if (ctx->filter->init_dict)
ret = ctx->filter->init_dict(ctx, options);
+ if (ret < 0)
+ return ret;
if (ctx->enable_str) {
ret = set_enable_expr(ctx, ctx->enable_str);
@@ -931,7 +933,7 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
return ret;
}
- return ret;
+ return 0;
}
int avfilter_init_str(AVFilterContext *filter, const char *args)