[PATCH] Move AV_NOPTS_VALUE, AV_TIME_BASE, AV_TIME_BASE_Q symbols from libavcodec to libavcore.

Stefano Sabatini stefano.sabatini-lala
Wed Dec 8 19:50:35 CET 2010


Remove another compile-time dependancy of libavfilter on libavcodec.
---
 libavcodec/avcodec.h      |    4 ----
 libavcore/avcore.h        |    4 ++++
 libavfilter/avfilter.h    |    5 +++--
 libavfilter/vsrc_buffer.h |    1 +
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 94ae9d3..a482216 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -89,10 +89,6 @@
 #   define FF_INTERNALC_MEM_TYPE size_t
 #endif
 
-#define AV_NOPTS_VALUE          INT64_C(0x8000000000000000)
-#define AV_TIME_BASE            1000000
-#define AV_TIME_BASE_Q          (AVRational){1, AV_TIME_BASE}
-
 /**
  * Identify the syntax and semantics of the bitstream.
  * The principle is roughly:
diff --git a/libavcore/avcore.h b/libavcore/avcore.h
index b19efe8..a3fa1fb 100644
--- a/libavcore/avcore.h
+++ b/libavcore/avcore.h
@@ -55,6 +55,10 @@ const char *avcore_configuration(void);
  */
 const char *avcore_license(void);
 
+#define AV_NOPTS_VALUE          INT64_C(0x8000000000000000)
+#define AV_TIME_BASE            1000000
+#define AV_TIME_BASE_Q          (AVRational){1, AV_TIME_BASE}
+
 /**
  * Those FF_API_* defines are not part of public API.
  * They may change, break or disappear at any time.
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 5d34bee..54cd905 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -23,10 +23,12 @@
 #define AVFILTER_AVFILTER_H
 
 #include "libavutil/avutil.h"
+#include "libavcore/avcore.h"
+#include "libavcore/samplefmt.h"
 
 #define LIBAVFILTER_VERSION_MAJOR  1
 #define LIBAVFILTER_VERSION_MINOR 68
-#define LIBAVFILTER_VERSION_MICRO  0
+#define LIBAVFILTER_VERSION_MICRO  1
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
                                                LIBAVFILTER_VERSION_MINOR, \
@@ -37,7 +39,6 @@
 #define LIBAVFILTER_BUILD       LIBAVFILTER_VERSION_INT
 
 #include <stddef.h>
-#include "libavcodec/avcodec.h"
 
 /**
  * Return the LIBAVFILTER_VERSION_INT constant.
diff --git a/libavfilter/vsrc_buffer.h b/libavfilter/vsrc_buffer.h
index fa20443..a77e42f 100644
--- a/libavfilter/vsrc_buffer.h
+++ b/libavfilter/vsrc_buffer.h
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavcodec/avcodec.h" /* AVFrame */
 #include "avfilter.h"
 
 int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame,
-- 
1.7.2.3


--WIyZ46R2i8wDzkSu--



More information about the ffmpeg-devel mailing list