aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/eval.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-06-16 18:27:46 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-06-16 18:27:46 +0000
commit2f62224bc0bc50adb6347abf3fe844e136f015c4 (patch)
tree597b82028e3ea08cdee536f2dec87b9a7f1e1d7b /libavutil/eval.c
parent08943c0bd14a3f687d9ff2c6b7bc820ce13a5272 (diff)
downloadffmpeg-2f62224bc0bc50adb6347abf3fe844e136f015c4.tar.gz
Improve av_parse_eval() error reporting.
Originally committed as revision 23627 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/eval.c')
-rw-r--r--libavutil/eval.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c
index 59ebd947f8..530e79a7be 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -182,7 +182,7 @@ void av_free_expr(AVExpr *e)
static int parse_primary(AVExpr **e, Parser *p)
{
AVExpr *d = av_mallocz(sizeof(AVExpr));
- char *next= p->s;
+ char *next = p->s, *s0 = p->s;
int ret, i;
if (!d)
@@ -211,7 +211,7 @@ static int parse_primary(AVExpr **e, Parser *p)
p->s= strchr(p->s, '(');
if (p->s==NULL) {
- av_log(p, AV_LOG_ERROR, "undefined constant or missing (\n");
+ av_log(p, AV_LOG_ERROR, "Undefined constant or missing '(' in '%s'\n", s0);
p->s= next;
av_free_expr(d);
return AVERROR(EINVAL);
@@ -222,7 +222,7 @@ static int parse_primary(AVExpr **e, Parser *p)
if ((ret = parse_expr(&d, p)) < 0)
return ret;
if (p->s[0] != ')') {
- av_log(p, AV_LOG_ERROR, "missing )\n");
+ av_log(p, AV_LOG_ERROR, "Missing ')' in '%s'\n", s0);
av_free_expr(d);
return AVERROR(EINVAL);
}
@@ -239,7 +239,7 @@ static int parse_primary(AVExpr **e, Parser *p)
parse_expr(&d->param[1], p);
}
if (p->s[0] != ')') {
- av_log(p, AV_LOG_ERROR, "missing )\n");
+ av_log(p, AV_LOG_ERROR, "Missing ')' or too many args in '%s'\n", s0);
av_free_expr(d);
return AVERROR(EINVAL);
}
@@ -290,7 +290,7 @@ static int parse_primary(AVExpr **e, Parser *p)
}
}
- av_log(p, AV_LOG_ERROR, "unknown function\n");
+ av_log(p, AV_LOG_ERROR, "Unknown function in '%s'\n", s0);
av_free_expr(d);
return AVERROR(EINVAL);
}