[MPlayer-cvslog] r32751 - in trunk: command.c m_property.c mpcommon.h mplayer.c

cboesch subversion at mplayerhq.hu
Mon Jan 3 20:39:31 CET 2011


Author: cboesch
Date: Mon Jan  3 20:39:31 2011
New Revision: 32751

Log:
Factorize ROUND() redefinitions macro.

Modified:
   trunk/command.c
   trunk/m_property.c
   trunk/mpcommon.h
   trunk/mplayer.c

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	Mon Jan  3 19:37:45 2011	(r32750)
+++ trunk/command.c	Mon Jan  3 20:39:31 2011	(r32751)
@@ -70,8 +70,6 @@
 #include "libavutil/avstring.h"
 #include "edl.h"
 
-#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
-
 static void rescale_input_coordinates(int ix, int iy, double *dx, double *dy)
 {
     //remove the borders, if any, and rescale to the range [0,1],[0,1]

Modified: trunk/m_property.c
==============================================================================
--- trunk/m_property.c	Mon Jan  3 19:37:45 2011	(r32750)
+++ trunk/m_property.c	Mon Jan  3 20:39:31 2011	(r32751)
@@ -30,10 +30,9 @@
 #include "m_option.h"
 #include "m_property.h"
 #include "mp_msg.h"
+#include "mpcommon.h"
 #include "help_mp.h"
 
-#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
-
 static int do_action(const m_option_t* prop_list, const char* name,
                      int action, void* arg, void *ctx) {
     const char* sep;

Modified: trunk/mpcommon.h
==============================================================================
--- trunk/mpcommon.h	Mon Jan  3 19:37:45 2011	(r32750)
+++ trunk/mpcommon.h	Mon Jan  3 20:39:31 2011	(r32751)
@@ -25,6 +25,8 @@
 #include "libmpdemux/demuxer.h"
 #include "sub/ass_mp.h"
 
+#define ROUND(x) ((int)((x) < 0 ? (x) - 0.5 : (x) + 0.5))
+
 struct sh_video;
 
 extern double sub_last_pts;

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Mon Jan  3 19:37:45 2011	(r32750)
+++ trunk/mplayer.c	Mon Jan  3 20:39:31 2011	(r32751)
@@ -148,9 +148,6 @@ float start_volume = -1;
 double start_pts = MP_NOPTS_VALUE;
 char *heartbeat_cmd;
 
-#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
-
-
 m_config_t* mconfig;
 
 //**************************************************************************//


More information about the MPlayer-cvslog mailing list