# HG changeset patch # User cboesch # Date 1294083571 0 # Node ID 6d08af681d549e61b79e981a988531c7e5217417 # Parent 83c490a2e9f37eee657e12a2fcf990ca3aae8270 Factorize ROUND() redefinitions macro. diff -r 83c490a2e9f3 -r 6d08af681d54 command.c --- a/command.c Mon Jan 03 18:37:45 2011 +0000 +++ b/command.c Mon Jan 03 19:39:31 2011 +0000 @@ -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] diff -r 83c490a2e9f3 -r 6d08af681d54 m_property.c --- a/m_property.c Mon Jan 03 18:37:45 2011 +0000 +++ b/m_property.c Mon Jan 03 19:39:31 2011 +0000 @@ -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; diff -r 83c490a2e9f3 -r 6d08af681d54 mpcommon.h --- a/mpcommon.h Mon Jan 03 18:37:45 2011 +0000 +++ b/mpcommon.h Mon Jan 03 19:39:31 2011 +0000 @@ -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; diff -r 83c490a2e9f3 -r 6d08af681d54 mplayer.c --- a/mplayer.c Mon Jan 03 18:37:45 2011 +0000 +++ b/mplayer.c Mon Jan 03 19:39:31 2011 +0000 @@ -148,9 +148,6 @@ 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; //**************************************************************************//