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

Function parse_factor

libavutil/eval.c:589–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587}
588
589static int parse_factor(AVExpr **e, Parser *p)
590{
591 int sign, sign2, ret;
592 AVExpr *e0, *e1, *e2;
593 if ((ret = parse_dB(&e0, p, &sign)) < 0)
594 return ret;
595 while(p->s[0]=='^'){
596 e1 = e0;
597 p->s++;
598 if ((ret = parse_dB(&e2, p, &sign2)) < 0) {
599 av_expr_free(e1);
600 return ret;
601 }
602 e0 = make_eval_expr(e_pow, 1, e1, e2);
603 if (!e0) {
604 av_expr_free(e1);
605 av_expr_free(e2);
606 return AVERROR(ENOMEM);
607 }
608 if (e0->param[1]) e0->param[1]->value *= (sign2|1);
609 }
610 if (e0) e0->value *= (sign|1);
611
612 *e = e0;
613 return 0;
614}
615
616static int parse_term(AVExpr **e, Parser *p)
617{

Callers 1

parse_termFunction · 0.85

Calls 3

parse_dBFunction · 0.85
av_expr_freeFunction · 0.85
make_eval_exprFunction · 0.85

Tested by

no test coverage detected