diff options
author | Max Kellermann <max@duempel.org> | 2014-03-01 19:18:48 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-03-01 19:18:50 +0100 |
commit | 07c1ba1f5ed2efed9b098b8deda4d5aa8c3a5cb8 (patch) | |
tree | d9104decec01b1e327625b7a5b713cc5fbecfe07 /src | |
parent | 14168eadb2a24e03abb2528b951dc5f0faed5513 (diff) | |
download | mpd-07c1ba1f5ed2efed9b098b8deda4d5aa8c3a5cb8.tar.gz mpd-07c1ba1f5ed2efed9b098b8deda4d5aa8c3a5cb8.tar.xz mpd-07c1ba1f5ed2efed9b098b8deda4d5aa8c3a5cb8.zip |
TagId3: disable charset conversion without GLib
Diffstat (limited to 'src')
-rw-r--r-- | src/tag/TagId3.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tag/TagId3.cxx b/src/tag/TagId3.cxx index 3a8df8322..c70ec0cd9 100644 --- a/src/tag/TagId3.cxx +++ b/src/tag/TagId3.cxx @@ -33,7 +33,10 @@ #include "fs/Path.hxx" #include "fs/FileSystem.hxx" +#ifdef HAVE_GLIB #include <glib.h> +#endif + #include <id3tag.h> #include <string> @@ -90,6 +93,7 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4) { id3_utf8_t *utf8; +#ifdef HAVE_GLIB /* use encoding field here? */ const char *encoding; if (is_id3v1 && @@ -112,10 +116,15 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4) } free(isostr); } else { +#else + (void)is_id3v1; +#endif utf8 = id3_ucs4_utf8duplicate(ucs4); if (gcc_unlikely(utf8 == nullptr)) return nullptr; +#ifdef HAVE_GLIB } +#endif id3_utf8_t *utf8_stripped = (id3_utf8_t *) xstrdup(Strip((char *)utf8)); |