[MPlayer-cvslog] r31187 - in trunk/libmpcodecs: vf_geq.c vf_qp.c

iive subversion at mplayerhq.hu
Fri May 21 01:17:42 CEST 2010


Author: iive
Date: Fri May 21 01:17:41 2010
New Revision: 31187

Log:
Fix compilation broken by FFmpeg-r23201 that changed the api of error logging.
Also fix evaluation after FFmpeg-r23149 "change order of parameters".
Let the filters fail if evaluation can't be done.

Modified:
   trunk/libmpcodecs/vf_geq.c
   trunk/libmpcodecs/vf_qp.c

Modified: trunk/libmpcodecs/vf_geq.c
==============================================================================
--- trunk/libmpcodecs/vf_geq.c	Thu May 20 00:56:41 2010	(r31186)
+++ trunk/libmpcodecs/vf_geq.c	Fri May 21 01:17:41 2010	(r31187)
@@ -178,11 +178,11 @@ static int vf_open(vf_instance_t *vf, ch
             plane==0 ? lum : (plane==1 ? cb : cr),
             NULL
         };
-        char * a;
-        vf->priv->e[plane] = ff_parse_expr(eq[plane], const_names, NULL, NULL, func2, func2_names, &a);
+        vf->priv->e[plane] = ff_parse_expr(eq[plane], const_names, NULL, NULL, func2_names, func2, 0, NULL);
 
         if (!vf->priv->e[plane]) {
-            mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s': %s\n", eq[plane], a);
+            mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s'\n", eq[plane]);
+            return 0;
         }
     }
 

Modified: trunk/libmpcodecs/vf_qp.c
==============================================================================
--- trunk/libmpcodecs/vf_qp.c	Thu May 20 00:56:41 2010	(r31186)
+++ trunk/libmpcodecs/vf_qp.c	Fri May 21 01:17:41 2010	(r31187)
@@ -66,11 +66,15 @@ static int config(struct vf_instance *vf
                 "qp",
                 NULL
             };
+            double 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);
+            temp_val= ff_parse_and_eval_expr(vf->priv->eq, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, NULL);
+
+            if (isnan(temp_val)){
+                mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\" \n", vf->priv->eq);
+                return 0;
+            }
+            vf->priv->lut[i+129]= lrintf(temp_val);
         }
 
 	return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);


More information about the MPlayer-cvslog mailing list