ffmpeg | branch: master | Gyan Doshi <ffm...@gyani.pro> | Wed Dec  4 16:21:11 
2019 +0530| [b66a800877d6f97fa94b41533e3d6a6273f7fb9f] | committer: Gyan Doshi

avfilter/crop: avoid premature eval error

Width and height expressions can refer to each other. Width is
evaluated twice to allow for reference to output height. So we
should not error out upon failure of first evaluation of width.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b66a800877d6f97fa94b41533e3d6a6273f7fb9f
---

 libavfilter/vf_crop.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index d6b4feb513..9bf4077c5d 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -174,10 +174,9 @@ static int config_input(AVFilterLink *link)
         s->vsub = pix_desc->log2_chroma_h;
     }
 
-    if ((ret = av_expr_parse_and_eval(&res, (expr = s->w_expr),
-                                      var_names, s->var_values,
-                                      NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 
0)
-        goto fail_expr;
+    av_expr_parse_and_eval(&res, (expr = s->w_expr),
+                           var_names, s->var_values,
+                           NULL, NULL, NULL, NULL, NULL, 0, ctx);
     s->var_values[VAR_OUT_W] = s->var_values[VAR_OW] = res;
     if ((ret = av_expr_parse_and_eval(&res, (expr = s->h_expr),
                                       var_names, s->var_values,

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to