Commit e4af97f5 authored by stefano's avatar stefano

Rename ff_eval_free() to ff_free_expr().

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22834 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 2d3852d0
...@@ -173,10 +173,10 @@ static double eval_expr(Parser * p, AVExpr * e) { ...@@ -173,10 +173,10 @@ static double eval_expr(Parser * p, AVExpr * e) {
static AVExpr * parse_expr(Parser *p); static AVExpr * parse_expr(Parser *p);
void ff_eval_free(AVExpr * e) { void ff_free_expr(AVExpr * e) {
if (!e) return; if (!e) return;
ff_eval_free(e->param[0]); ff_free_expr(e->param[0]);
ff_eval_free(e->param[1]); ff_free_expr(e->param[1]);
av_freep(&e); av_freep(&e);
} }
...@@ -211,7 +211,7 @@ static AVExpr * parse_primary(Parser *p) { ...@@ -211,7 +211,7 @@ static AVExpr * parse_primary(Parser *p) {
if(p->s==NULL){ if(p->s==NULL){
*p->error = "undefined constant or missing ("; *p->error = "undefined constant or missing (";
p->s= next; p->s= next;
ff_eval_free(d); ff_free_expr(d);
return NULL; return NULL;
} }
p->s++; // "(" p->s++; // "("
...@@ -220,7 +220,7 @@ static AVExpr * parse_primary(Parser *p) { ...@@ -220,7 +220,7 @@ static AVExpr * parse_primary(Parser *p) {
d = parse_expr(p); d = parse_expr(p);
if(p->s[0] != ')'){ if(p->s[0] != ')'){
*p->error = "missing )"; *p->error = "missing )";
ff_eval_free(d); ff_free_expr(d);
return NULL; return NULL;
} }
p->s++; // ")" p->s++; // ")"
...@@ -233,7 +233,7 @@ static AVExpr * parse_primary(Parser *p) { ...@@ -233,7 +233,7 @@ static AVExpr * parse_primary(Parser *p) {
} }
if(p->s[0] != ')'){ if(p->s[0] != ')'){
*p->error = "missing )"; *p->error = "missing )";
ff_eval_free(d); ff_free_expr(d);
return NULL; return NULL;
} }
p->s++; // ")" p->s++; // ")"
...@@ -282,7 +282,7 @@ static AVExpr * parse_primary(Parser *p) { ...@@ -282,7 +282,7 @@ static AVExpr * parse_primary(Parser *p) {
} }
*p->error = "unknown function"; *p->error = "unknown function";
ff_eval_free(d); ff_free_expr(d);
return NULL; return NULL;
} }
...@@ -404,7 +404,7 @@ AVExpr * ff_parse(const char *s, const char * const *const_name, ...@@ -404,7 +404,7 @@ AVExpr * ff_parse(const char *s, const char * const *const_name,
e = parse_expr(&p); e = parse_expr(&p);
if (!verify_expr(e)) { if (!verify_expr(e)) {
ff_eval_free(e); ff_free_expr(e);
e = NULL; e = NULL;
} }
end: end:
...@@ -428,7 +428,7 @@ double ff_eval2(const char *s, const double *const_value, const char * const *co ...@@ -428,7 +428,7 @@ double ff_eval2(const char *s, const double *const_value, const char * const *co
double d; double d;
if (!e) return NAN; if (!e) return NAN;
d = ff_parse_eval(e, const_value, opaque); d = ff_parse_eval(e, const_value, opaque);
ff_eval_free(e); ff_free_expr(e);
return d; return d;
} }
......
...@@ -58,7 +58,7 @@ double ff_eval2(const char *s, const double *const_value, const char * const *co ...@@ -58,7 +58,7 @@ double ff_eval2(const char *s, const double *const_value, const char * const *co
* @param func1_name NULL terminated array of zero terminated strings of func1 identifers * @param func1_name NULL terminated array of zero terminated strings of func1 identifers
* @param func2_name NULL terminated array of zero terminated strings of func2 identifers * @param func2_name NULL terminated array of zero terminated strings of func2 identifers
* @param error pointer to a char* which is set to an error message if something goes wrong * @param error pointer to a char* which is set to an error message if something goes wrong
* @return AVExpr which must be freed with ff_eval_free by the user when it is not needed anymore * @return AVExpr which must be freed with ff_free_expr() by the user when it is not needed anymore
* NULL if anything went wrong * NULL if anything went wrong
*/ */
AVExpr * ff_parse(const char *s, const char * const *const_name, AVExpr * ff_parse(const char *s, const char * const *const_name,
...@@ -72,7 +72,8 @@ AVExpr * ff_parse(const char *s, const char * const *const_name, ...@@ -72,7 +72,8 @@ AVExpr * ff_parse(const char *s, const char * const *const_name,
* @return the value of the expression * @return the value of the expression
*/ */
double ff_parse_eval(AVExpr * e, const double *const_value, void *opaque); double ff_parse_eval(AVExpr * e, const double *const_value, void *opaque);
void ff_eval_free(AVExpr * e);
void ff_free_expr(AVExpr *e);
/** /**
* Parses the string in numstr and returns its value as a double. If * Parses the string in numstr and returns its value as a double. If
......
...@@ -255,7 +255,7 @@ void ff_rate_control_uninit(MpegEncContext *s) ...@@ -255,7 +255,7 @@ void ff_rate_control_uninit(MpegEncContext *s)
RateControlContext *rcc= &s->rc_context; RateControlContext *rcc= &s->rc_context;
emms_c(); emms_c();
ff_eval_free(rcc->rc_eq_eval); ff_free_expr(rcc->rc_eq_eval);
av_freep(&rcc->entry); av_freep(&rcc->entry);
#if CONFIG_LIBXVID #if CONFIG_LIBXVID
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment