summaryrefslogtreecommitdiff
path: root/libavcodec/ratecontrol.c
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis.issaris@uhasselt.be>2006-09-27 19:46:19 +0000
committerPanagiotis Issaris <takis.issaris@uhasselt.be>2006-09-27 19:46:19 +0000
commitd80f243ae996ced4bce81b12ada3af7803ce36f0 (patch)
tree234f7547175cefcba0606e10586fc2fd102be8c9 /libavcodec/ratecontrol.c
parent0c6309225d06f11b5168cc661fbe9326f0379921 (diff)
Make ratecontrol use ff_eval2().
Originally committed as revision 6354 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r--libavcodec/ratecontrol.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 5c339fa152..721edf95a9 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -259,6 +259,7 @@ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_f
const int pict_type= rce->new_pict_type;
const double mb_num= s->mb_num;
int i;
+ char *error = NULL;
double const_values[]={
M_PI,
@@ -325,9 +326,9 @@ static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_f
NULL
};
- bits= ff_eval(s->avctx->rc_eq, const_values, const_names, func1, func1_names, NULL, NULL, rce);
+ bits= ff_eval2(s->avctx->rc_eq, const_values, const_names, func1, func1_names, NULL, NULL, rce, &error);
if (isnan(bits)) {
- av_log(s->avctx, AV_LOG_ERROR, "Unable to parse rc_eq \"%s\".\n", s->avctx->rc_eq);
+ av_log(s->avctx, AV_LOG_ERROR, "Error evaluating rc_eq \"%s\": %s\n", s->avctx->rc_eq, error? error : "");
return -1;
}