[libbluray-devel] Fix build without libxml2
hpi1
git at videolan.org
Fri Jan 24 20:30:04 CET 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Jan 24 13:01:01 2014 +0200| [2714ffcef140b24ac75e23cc1087f7e8a6b277e4] | committer: hpi1
Fix build without libxml2
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=2714ffcef140b24ac75e23cc1087f7e8a6b277e4
---
src/libbluray/bdnav/meta_parse.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/libbluray/bdnav/meta_parse.c b/src/libbluray/bdnav/meta_parse.c
index c2765ef..b36ccc9 100644
--- a/src/libbluray/bdnav/meta_parse.c
+++ b/src/libbluray/bdnav/meta_parse.c
@@ -202,6 +202,7 @@ META_ROOT *meta_parse(const char *device_path)
const META_DL *meta_get(const META_ROOT *meta_root, const char *language_code)
{
+#ifdef HAVE_LIBXML2
unsigned i;
if (meta_root == NULL || meta_root->dl_count == 0) {
@@ -227,10 +228,14 @@ const META_DL *meta_get(const META_ROOT *meta_root, const char *language_code)
BD_DEBUG(DBG_DIR, "requested disclib language '%s' or default '"DEFAULT_LANGUAGE"' not found, using '%s' instead\n", language_code, meta_root->dl_entries[0].language_code);
return &meta_root->dl_entries[0];
+#else
+ return NULL;
+#endif
}
void meta_free(META_ROOT **p)
{
+#ifdef HAVE_LIBXML2
if (p && *p)
{
uint8_t i;
@@ -251,4 +256,5 @@ void meta_free(META_ROOT **p)
X_FREE((*p)->dl_entries);
X_FREE(*p);
}
+#endif
}
More information about the libbluray-devel
mailing list