mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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>
This commit is contained in:
parent
54d201ae20
commit
10ad3cd798
@ -924,6 +924,8 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options)
|
|||||||
ret = ctx->filter->init(ctx);
|
ret = ctx->filter->init(ctx);
|
||||||
else if (ctx->filter->init_dict)
|
else if (ctx->filter->init_dict)
|
||||||
ret = ctx->filter->init_dict(ctx, options);
|
ret = ctx->filter->init_dict(ctx, options);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (ctx->enable_str) {
|
if (ctx->enable_str) {
|
||||||
ret = set_enable_expr(ctx, 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 ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int avfilter_init_str(AVFilterContext *filter, const char *args)
|
int avfilter_init_str(AVFilterContext *filter, const char *args)
|
||||||
|
Loading…
Reference in New Issue
Block a user