MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / parse_term

Function parse_term

libavutil/eval.c:616–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

614}
615
616static int parse_term(AVExpr **e, Parser *p)
617{
618 int ret;
619 AVExpr *e0, *e1, *e2;
620 if ((ret = parse_factor(&e0, p)) < 0)
621 return ret;
622 while (p->s[0]=='*' || p->s[0]=='/') {
623 int c= *p->s++;
624 e1 = e0;
625 if ((ret = parse_factor(&e2, p)) < 0) {
626 av_expr_free(e1);
627 return ret;
628 }
629 e0 = make_eval_expr(c == '*' ? e_mul : e_div, 1, e1, e2);
630 if (!e0) {
631 av_expr_free(e1);
632 av_expr_free(e2);
633 return AVERROR(ENOMEM);
634 }
635 }
636 *e = e0;
637 return 0;
638}
639
640static int parse_subexpr(AVExpr **e, Parser *p)
641{

Callers 1

parse_subexprFunction · 0.85

Calls 3

parse_factorFunction · 0.85
av_expr_freeFunction · 0.85
make_eval_exprFunction · 0.85

Tested by

no test coverage detected