[FFmpeg-cvslog] lavf/apetag: move common stuff between writer and reader to single file

Paul B Mahol git at videolan.org
Sun Jul 29 04:32:22 CEST 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jul 29 02:17:57 2012 +0000| [e4f3a9693dd003393131f8e144ef3515e93fe6cd] | committer: Paul B Mahol

lavf/apetag: move common stuff between writer and reader to single file

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4f3a9693dd003393131f8e144ef3515e93fe6cd
---

 libavformat/apetag.c    |    4 +---
 libavformat/apetag.h    |    4 ++++
 libavformat/apetagenc.c |    4 ----
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/libavformat/apetag.c b/libavformat/apetag.c
index 4d25a8e..6f6a61b 100644
--- a/libavformat/apetag.c
+++ b/libavformat/apetag.c
@@ -26,8 +26,6 @@
 #include "apetag.h"
 #include "internal.h"
 
-#define APE_TAG_VERSION               2000
-#define APE_TAG_FOOTER_BYTES          32
 #define APE_TAG_FLAG_CONTAINS_HEADER  (1 << 31)
 #define APE_TAG_FLAG_IS_HEADER        (1 << 29)
 #define APE_TAG_FLAG_IS_BINARY        (1 << 1)
@@ -127,7 +125,7 @@ void ff_ape_parse_tag(AVFormatContext *s)
     avio_seek(pb, file_size - APE_TAG_FOOTER_BYTES, SEEK_SET);
 
     avio_read(pb, buf, 8);     /* APETAGEX */
-    if (strncmp(buf, "APETAGEX", 8)) {
+    if (strncmp(buf, APE_TAG_PREAMBLE, 8)) {
         return;
     }
 
diff --git a/libavformat/apetag.h b/libavformat/apetag.h
index 7727921..17a9a72 100644
--- a/libavformat/apetag.h
+++ b/libavformat/apetag.h
@@ -25,6 +25,10 @@
 
 #include "avformat.h"
 
+#define APE_TAG_PREAMBLE        "APETAGEX"
+#define APE_TAG_VERSION         2000
+#define APE_TAG_FOOTER_BYTES    32
+
 /**
  * Read and parse an APE tag
  */
diff --git a/libavformat/apetagenc.c b/libavformat/apetagenc.c
index 3fbcad1..42f5836 100644
--- a/libavformat/apetagenc.c
+++ b/libavformat/apetagenc.c
@@ -24,10 +24,6 @@
 #include "avformat.h"
 #include "apetag.h"
 
-#define APE_TAG_PREAMBLE        "APETAGEX"
-#define APE_TAG_VERSION         2000
-#define APE_TAG_FOOTER_BYTES    32
-
 static int string_is_ascii(const uint8_t *str)
 {
     while (*str && *str >= 0x20 && *str <= 0x7e ) str++;



More information about the ffmpeg-cvslog mailing list