[FFmpeg-devel] [PATCH 1/8] Fix evaluation of expression of the form: E1; E2.
Stefano Sabatini
stefano.sabatini-lala
Sun Oct 31 15:27:03 CET 2010
The pointer to the char ';' has to be increased before to evaluate
";E2".
---
libavutil/eval.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 6e03498..c1a0539 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -404,12 +404,12 @@ static int parse_expr(AVExpr **e, Parser *p)
if ((ret = parse_subexpr(&e0, p)) < 0)
return ret;
while (*p->s == ';') {
+ p->s++;
e1 = e0;
if ((ret = parse_subexpr(&e2, p)) < 0) {
av_free_expr(e1);
return ret;
}
- p->s++;
e0 = new_eval_expr(e_last, 1, e1, e2);
if (!e0) {
av_free_expr(e1);
@@ -534,6 +534,7 @@ int main(void)
double d;
const char **expr, *exprs[] = {
"",
+ "1;2",
"1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)",
"80G/80Gi"
"1k",
--
1.7.1
More information about the ffmpeg-devel
mailing list