]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/scale: don't fail for circular expressions
authorGyan Doshi <ffmpeg@gyani.pro>
Sun, 26 Jan 2020 15:36:53 +0000 (21:06 +0530)
committerGyan Doshi <ffmpeg@gyani.pro>
Sun, 26 Jan 2020 15:36:53 +0000 (21:06 +0530)
Due to conditional expressions, it is possible for them to be resolved
successfully. A warning is still printed.

libavfilter/vf_scale.c

index d46c767e70fdd35d79cb787ee98138c6820d46be..0348f19d33e8ada2e352ba203d30b9634efb33b0 100644 (file)
@@ -184,8 +184,7 @@ static int check_exprs(AVFilterContext *ctx)
 
     if ((vars_w[VAR_OUT_H] || vars_w[VAR_OH]) &&
         (vars_h[VAR_OUT_W] || vars_h[VAR_OW])) {
-        av_log(ctx, AV_LOG_ERROR, "Circular expressions invalid for width '%s' and height '%s'.\n", scale->w_expr, scale->h_expr);
-        return AVERROR(EINVAL);
+        av_log(ctx, AV_LOG_WARNING, "Circular references detected for width '%s' and height '%s' - possibly invalid.\n", scale->w_expr, scale->h_expr);
     }
 
     if (ctx->filter != &ff_vf_scale2ref &&