summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/eval.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-03-14 21:14:07 +0000
committerMike Melanson <mike@multimedia.cx>2004-03-14 21:14:07 +0000
commit0d90aec0fd7428a77b5c4c536ab65635669bc42d (patch)
tree9eb56c6c1176bf6a6f3ae65199a3f43aa8c2aa2d /src/libffmpeg/libavcodec/eval.c
parentb4d3aa3dcce07b90098e33c37b563e797378d0f1 (diff)
downloadxine-lib-0d90aec0fd7428a77b5c4c536ab65635669bc42d.tar.gz
xine-lib-0d90aec0fd7428a77b5c4c536ab65635669bc42d.tar.bz2
sync to ffmpeg build 4707
CVS patchset: 6253 CVS date: 2004/03/14 21:14:07
Diffstat (limited to 'src/libffmpeg/libavcodec/eval.c')
-rw-r--r--src/libffmpeg/libavcodec/eval.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libffmpeg/libavcodec/eval.c b/src/libffmpeg/libavcodec/eval.c
index 714ba046c..aead600e8 100644
--- a/src/libffmpeg/libavcodec/eval.c
+++ b/src/libffmpeg/libavcodec/eval.c
@@ -115,12 +115,16 @@ static void evalPrimary(Parser *p){
p->s++; // "("
evalExpression(p);
d= pop(p);
- p->s++; // ")" or ","
- if(p->s[-1]== ','){
+ if(p->s[0]== ','){
+ p->s++; // ","
evalExpression(p);
d2= pop(p);
- p->s++; // ")"
}
+ if(p->s[0] != ')'){
+ av_log(NULL, AV_LOG_ERROR, "Parser: missing ) in \"%s\"\n", next);
+ return;
+ }
+ p->s++; // ")"
if( strmatch(next, "sinh" ) ) d= sinh(d);
else if( strmatch(next, "cosh" ) ) d= cosh(d);
@@ -136,7 +140,9 @@ static void evalPrimary(Parser *p){
else if( strmatch(next, "max" ) ) d= d > d2 ? d : d2;
else if( strmatch(next, "min" ) ) d= d < d2 ? d : d2;
else if( strmatch(next, "gt" ) ) d= d > d2 ? 1.0 : 0.0;
+ else if( strmatch(next, "gte" ) ) d= d >= d2 ? 1.0 : 0.0;
else if( strmatch(next, "lt" ) ) d= d > d2 ? 0.0 : 1.0;
+ else if( strmatch(next, "lte" ) ) d= d >= d2 ? 0.0 : 1.0;
else if( strmatch(next, "eq" ) ) d= d == d2 ? 1.0 : 0.0;
// else if( strmatch(next, "l1" ) ) d= 1 + d2*(d - 1);
// else if( strmatch(next, "sq01" ) ) d= (d >= 0.0 && d <=1.0) ? 1.0 : 0.0;
@@ -164,10 +170,6 @@ static void evalPrimary(Parser *p){
}
}
- if(p->s[-1]!= ')'){
- av_log(NULL, AV_LOG_ERROR, "Parser: missing ) in \"%s\"\n", next);
- return;
- }
push(p, d);
}