aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-15 05:13:11 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-11 22:37:58 +0100
commitc256491f9669893917f4db5c0cf56b17530f10b6 (patch)
tree09cda7f56e6606ce75e96cec7a6848f3342b6ef1
parentedaf8c961510ec7a4d83fdbd4b0986ae67ee1357 (diff)
downloadffmpeg-c256491f9669893917f4db5c0cf56b17530f10b6.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> (cherry picked from commit 10ad3cd7982e5a5d922cabd176c97571a7684c60)
-rw-r--r--libavfilter/avfilter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 22ecad5f77..6a344282eb 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -925,6 +925,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);
@@ -932,7 +934,7 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
return ret;
}
- return ret;
+ return 0;
}
int avfilter_init_str(AVFilterContext *filter, const char *args)