Revision f66e4f5f libavcodec/eval.c

View differences:

libavcodec/eval.c
155 155
        case e_func2:  return e->value * e->a.func2(p->opaque, eval_expr(p, e->param[0]), eval_expr(p, e->param[1]));
156 156
        case e_squish: return 1/(1+exp(4*eval_expr(p, e->param[0])));
157 157
        case e_gauss: { double d = eval_expr(p, e->param[0]); return exp(-d*d/2)/sqrt(2*M_PI); }
158
        case e_ld:     return e->value * p->var[clip(eval_expr(p, e->param[0]), 0, VARS-1)];
158
        case e_ld:     return e->value * p->var[av_clip(eval_expr(p, e->param[0]), 0, VARS-1)];
159 159
        case e_while: {
160 160
            double d = NAN;
161 161
            while(eval_expr(p, e->param[0]))
......
177 177
                case e_div: return e->value * (d / d2);
178 178
                case e_add: return e->value * (d + d2);
179 179
                case e_last:return e->value * d2;
180
                case e_st : return e->value * (p->var[clip(d, 0, VARS-1)]= d2);
180
                case e_st : return e->value * (p->var[av_clip(d, 0, VARS-1)]= d2);
181 181
            }
182 182
        }
183 183
    }

Also available in: Unified diff