Added
Link Here
|
1 |
--- ./src/mp4file.c.orig 2010-07-13 12:23:59.000000000 +0100 |
2 |
+++ ./src/mp4file.c 2010-07-13 12:39:31.000000000 +0100 |
3 |
@@ -132,6 +132,8 @@ |
4 |
/* define metadata bug is present (see note at mp4_write_file_info()) */ |
5 |
#define MP4V2_HAS_METADATA_BUG TRUE |
6 |
|
7 |
+#define HAVE_LIBMP4V2_19X 1 |
8 |
+ |
9 |
#include <sys/types.h> |
10 |
#include <sys/param.h> |
11 |
#include <inttypes.h> |
12 |
@@ -399,7 +401,7 @@ |
13 |
#else |
14 |
#warning "Album Artist field not supported with this version of libmp4v2. Album Artist support requires at least V1.6.0" |
15 |
#endif |
16 |
-#if HAVE_LIBMP4V2_2 |
17 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
18 |
if (MP4GetMetadataComposer(mp4File, &value) && value != NULL) |
19 |
#else |
20 |
if (MP4GetMetadataWriter(mp4File, &value) && value != NULL) |
21 |
@@ -413,7 +415,7 @@ |
22 |
track->comment = charset_to_utf8 (value); |
23 |
g_free(value); |
24 |
} |
25 |
-#if HAVE_LIBMP4V2_2 |
26 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
27 |
if (MP4GetMetadataReleaseDate(mp4File, &value) && value != NULL) |
28 |
#else |
29 |
if (MP4GetMetadataYear(mp4File, &value) && value != NULL) |
30 |
@@ -447,7 +449,7 @@ |
31 |
track->genre = charset_to_utf8 (value); |
32 |
g_free(value); |
33 |
} |
34 |
-#if HAVE_LIBMP4V2_2 |
35 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
36 |
if (MP4GetMetadataBPM (mp4File, &numvalue)) |
37 |
#else |
38 |
if (MP4GetMetadataTempo (mp4File, &numvalue)) |
39 |
@@ -541,7 +543,7 @@ |
40 |
&m_track, &m_tracks); |
41 |
gboolean has_disk = MP4GetMetadataDisk (mp4File, |
42 |
&m_disk, &m_disks);*/ |
43 |
-#if HAVE_LIBMP4V2_2 |
44 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
45 |
gboolean has_tempo = MP4GetMetadataBPM (mp4File, |
46 |
&m_tempo); |
47 |
#else |
48 |
@@ -553,13 +555,13 @@ |
49 |
/* MP4GetMetadataName (mp4File, &m_name); |
50 |
MP4GetMetadataArtist (mp4File, &m_artist); |
51 |
MP4GetMetadataAlbumArtist (mp4File, &m_albumartist); |
52 |
-#if HAVE_LIBMP4V2_2 |
53 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
54 |
MP4GetMetadataComposer (mp4File, &m_writer); |
55 |
#else |
56 |
MP4GetMetadataWriter (mp4File, &m_writer); |
57 |
#endif |
58 |
MP4GetMetadataComment (mp4File, &m_comment); |
59 |
-#if HAVE_LIBMP4V2_2 |
60 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
61 |
MP4GetMetadataReleaseDate (mp4File, &m_year); |
62 |
#else |
63 |
MP4GetMetadataYear (mp4File, &m_year); |
64 |
@@ -584,7 +586,7 @@ |
65 |
g_free (value); |
66 |
#endif |
67 |
value = charset_from_utf8 (track->composer); |
68 |
-#if HAVE_LIBMP4V2_2 |
69 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
70 |
MP4SetMetadataComposer (mp4File, value); |
71 |
#else |
72 |
MP4SetMetadataWriter (mp4File, value); |
73 |
@@ -596,7 +598,7 @@ |
74 |
g_free (value); |
75 |
|
76 |
value = g_strdup_printf ("%d", track->year); |
77 |
-#if HAVE_LIBMP4V2_2 |
78 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
79 |
MP4SetMetadataReleaseDate (mp4File, value); |
80 |
#else |
81 |
MP4SetMetadataYear (mp4File, value); |
82 |
@@ -611,7 +613,7 @@ |
83 |
|
84 |
MP4SetMetadataDisk (mp4File, track->cd_nr, track->cds); |
85 |
|
86 |
-#if HAVE_LIBMP4V2_2 |
87 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
88 |
MP4SetMetadataBPM (mp4File, track->BPM); |
89 |
#else |
90 |
MP4SetMetadataTempo (mp4File, track->BPM); |
91 |
@@ -626,7 +628,7 @@ |
92 |
g_free (value); |
93 |
|
94 |
#if MP4V2_HAS_METADATA_BUG |
95 |
-#if HAVE_LIBMP4V2_2 |
96 |
+#if HAVE_LIBMP4V2_2 && !HAVE_LIBMP4V2_19X |
97 |
if (has_tempo) MP4SetMetadataBPM (mp4File, m_tempo); |
98 |
#else |
99 |
if (has_tempo) MP4SetMetadataTempo (mp4File, m_tempo); |