summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcboesch <cboesch@b3059339-0415-0410-9bf9-f77b7e298cf2>2011-01-03 19:39:31 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-31 16:03:10 +0200
commit74c285e090b875d1a1e4e32adc28dcf12469a8b4 (patch)
treee8d7dea2823b77179f095485e5b49cbf2736a4f8
parent14c5377a0f3f5f94bd76f833d09b3f858165d160 (diff)
downloadmpv-74c285e090b875d1a1e4e32adc28dcf12469a8b4.tar.bz2
mpv-74c285e090b875d1a1e4e32adc28dcf12469a8b4.tar.xz
cleanup: define ROUND() macro in mpcommon.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32751 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--command.c2
-rw-r--r--m_property.c3
-rw-r--r--mpcommon.h2
-rw-r--r--mplayer.c2
4 files changed, 3 insertions, 6 deletions
diff --git a/command.c b/command.c
index efe538f739..bc6aa3c818 100644
--- a/command.c
+++ b/command.c
@@ -70,8 +70,6 @@
#include "mp_fifo.h"
#include "libavutil/avstring.h"
-#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
-
extern int use_menu;
static void rescale_input_coordinates(struct MPContext *mpctx, int ix, int iy,
diff --git a/m_property.c b/m_property.c
index 363e042f1c..93fa8863fd 100644
--- a/m_property.c
+++ b/m_property.c
@@ -30,8 +30,7 @@
#include "m_option.h"
#include "m_property.h"
#include "mp_msg.h"
-
-#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
+#include "mpcommon.h"
static int do_action(const m_option_t* prop_list, const char* name,
int action, void* arg, void *ctx) {
diff --git a/mpcommon.h b/mpcommon.h
index 82b860bd87..891331293f 100644
--- a/mpcommon.h
+++ b/mpcommon.h
@@ -22,6 +22,8 @@
// both int64_t and double should be able to represent this exactly
#define MP_NOPTS_VALUE (-1LL<<63)
+#define ROUND(x) ((int)((x) < 0 ? (x) - 0.5 : (x) + 0.5))
+
extern const char *mplayer_version;
#endif /* MPLAYER_MPCOMMON_H */
diff --git a/mplayer.c b/mplayer.c
index 03067ad9b0..e5eea0890c 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -112,8 +112,6 @@ float start_volume = -1;
char *heartbeat_cmd;
-#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
-
#ifdef HAVE_RTC
#ifdef __linux__
#include <linux/rtc.h>