[MPlayer-cvslog] r31859 - in branches/1.0rc4/libmpcodecs: vf_geq.c vf_qp.c
siretart
subversion at mplayerhq.hu
Thu Jul 29 13:53:04 CEST 2010
Author: siretart
Date: Thu Jul 29 13:53:03 2010
New Revision: 31859
Log:
Revert commits 31299 and 31187 by cehoyos for compatibility with 0.6
Modified:
branches/1.0rc4/libmpcodecs/vf_geq.c
branches/1.0rc4/libmpcodecs/vf_qp.c
Modified: branches/1.0rc4/libmpcodecs/vf_geq.c
==============================================================================
--- branches/1.0rc4/libmpcodecs/vf_geq.c Thu Jul 29 13:36:59 2010 (r31858)
+++ branches/1.0rc4/libmpcodecs/vf_geq.c Thu Jul 29 13:53:03 2010 (r31859)
@@ -137,7 +137,7 @@ static void uninit(struct vf_instance *v
//===========================================================================//
static int vf_open(vf_instance_t *vf, char *args){
char eq[3][2000] = { { 0 }, { 0 }, { 0 } };
- int plane, res;
+ int plane;
vf->config=config;
vf->put_image=put_image;
@@ -178,11 +178,11 @@ static int vf_open(vf_instance_t *vf, ch
plane==0 ? lum : (plane==1 ? cb : cr),
NULL
};
- res = ff_parse_expr(&vf->priv->e[plane], eq[plane], const_names, NULL, NULL, func2_names, func2, 0, NULL);
+ char * a;
+ vf->priv->e[plane] = ff_parse_expr(eq[plane], const_names, NULL, NULL, func2, func2_names, &a);
- if (res < 0) {
- mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s'\n", eq[plane]);
- return 0;
+ if (!vf->priv->e[plane]) {
+ mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s': %s\n", eq[plane], a);
}
}
Modified: branches/1.0rc4/libmpcodecs/vf_qp.c
==============================================================================
--- branches/1.0rc4/libmpcodecs/vf_qp.c Thu Jul 29 13:36:59 2010 (r31858)
+++ branches/1.0rc4/libmpcodecs/vf_qp.c Thu Jul 29 13:53:03 2010 (r31859)
@@ -66,16 +66,11 @@ static int config(struct vf_instance *vf
"qp",
NULL
};
- double temp_val;
- int res;
-
- res= ff_parse_and_eval_expr(&temp_val, vf->priv->eq, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, NULL);
- if (res < 0){
- mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\" \n", vf->priv->eq);
- return 0;
- }
- vf->priv->lut[i+129]= lrintf(temp_val);
+ const char *error = NULL;
+ vf->priv->lut[i+129]= lrintf(ff_parse_and_eval_expr(vf->priv->eq, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error));
+ if (error)
+ mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\": %s\n", vf->priv->eq, error);
}
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
More information about the MPlayer-cvslog
mailing list