summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-12 15:29:31 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-15 18:45:43 +0200
commite9022ec470e9334a6d0f3cb044027964ac4f63f6 (patch)
tree0e9c163e9489dbdab07f7e7dbb585f09c1b748d0
parentadedee42851d413de87b479340eb015ee33b497b (diff)
downloadmpv-e9022ec470e9334a6d0f3cb044027964ac4f63f6.tar.bz2
mpv-e9022ec470e9334a6d0f3cb044027964ac4f63f6.tar.xz
cleanup: move MP_NOPTS_VALUE definition to mpcommon.h
-rw-r--r--libmpcodecs/vf.h5
-rw-r--r--libmpdemux/demuxer.h4
-rw-r--r--libvo/video_out.h5
-rw-r--r--mpcommon.h3
-rw-r--r--spudec.c3
-rw-r--r--subreader.c2
6 files changed, 8 insertions, 14 deletions
diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h
index 8814ffe11a..58cfaaf787 100644
--- a/libmpcodecs/vf.h
+++ b/libmpcodecs/vf.h
@@ -20,6 +20,7 @@
#define MPLAYER_VF_H
#include "mp_image.h"
+#include "mpcommon.h"
struct MPOpts;
struct vf_instance;
@@ -116,10 +117,6 @@ typedef struct vf_seteq_s
#include "vfcap.h"
-//FIXME this should be in a common header, but i dunno which
-#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
-
-
// functions:
void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h);
mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h);
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index 9b66e27910..df0fdaa9bb 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -27,6 +27,7 @@
#include "stream/stream.h"
#include "bstr.h"
+#include "mpcommon.h"
struct MPOpts;
@@ -96,9 +97,6 @@ struct MPOpts;
// A virtual demuxer type for the network code
#define DEMUXER_TYPE_PLAYLIST (2<<16)
-
-#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
-
enum timestamp_type {
TIMESTAMP_TYPE_PTS,
TIMESTAMP_TYPE_SORT,
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 36a161aaf5..0630aee9ca 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -26,11 +26,8 @@
#include <inttypes.h>
#include <stdbool.h>
-//#include "font_load.h"
#include "libmpcodecs/img_format.h"
-//#include "vidix/vidix.h"
-
-#define MP_NOPTS_VALUE (-1LL<<63)
+#include "mpcommon.h"
#define VO_EVENT_EXPOSE 1
#define VO_EVENT_RESIZE 2
diff --git a/mpcommon.h b/mpcommon.h
index ac57ae9d02..82b860bd87 100644
--- a/mpcommon.h
+++ b/mpcommon.h
@@ -19,6 +19,9 @@
#ifndef MPLAYER_MPCOMMON_H
#define MPLAYER_MPCOMMON_H
+// both int64_t and double should be able to represent this exactly
+#define MP_NOPTS_VALUE (-1LL<<63)
+
extern const char *mplayer_version;
#endif /* MPLAYER_MPCOMMON_H */
diff --git a/spudec.c b/spudec.c
index de7d443ffc..f48d47fd2a 100644
--- a/spudec.c
+++ b/spudec.c
@@ -43,6 +43,7 @@
#include "libavutil/avutil.h"
#include "ffmpeg_files/intreadwrite.h"
#include "libswscale/swscale.h"
+#include "mpcommon.h"
/* Valid values for spu_aamode:
0: none (fastest, most ugly)
@@ -1336,8 +1337,6 @@ void spudec_set_hw_spu(void *this, struct vo *hw_spu)
vo_control(hw_spu, VOCTRL_SET_SPU_PALETTE, spu->global_palette);
}
-#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
-
/**
* palette must contain at least 256 32-bit entries, otherwise crashes
* are possible
diff --git a/subreader.c b/subreader.c
index 3d422ddbdf..c9b3261c0e 100644
--- a/subreader.c
+++ b/subreader.c
@@ -32,6 +32,7 @@
#include "config.h"
#include "mp_msg.h"
#include "subreader.h"
+#include "mpcommon.h"
#include "stream/stream.h"
#include "libavutil/common.h"
#include "libavutil/avstring.h"
@@ -2359,7 +2360,6 @@ void sub_add_text(subtitle *sub, const char *txt, int len, double endpts) {
#endif
}
-#define MP_NOPTS_VALUE (-1LL<<63)
/**
* \brief remove outdated subtitle lines.
* \param sub subtitle struct to modify