[libbluray-devel] Fix variable scopes
hpi1
git at videolan.org
Thu Jun 15 00:03:31 CEST 2017
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Jun 9 17:37:55 2017 +0300| [809d4fff42f9c73b07c595b9bb0bdcfe047f5e27] | committer: hpi1
Fix variable scopes
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=809d4fff42f9c73b07c595b9bb0bdcfe047f5e27
---
src/libbluray/bdnav/meta_parse.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/libbluray/bdnav/meta_parse.c b/src/libbluray/bdnav/meta_parse.c
index c65ac9e7..e857f68f 100644
--- a/src/libbluray/bdnav/meta_parse.c
+++ b/src/libbluray/bdnav/meta_parse.c
@@ -154,16 +154,16 @@ META_ROOT *meta_parse(BD_DISC *disc)
{
#ifdef HAVE_LIBXML2
META_ROOT *root = calloc(1, sizeof(META_ROOT));
+ unsigned i;
+
if (!root) {
BD_DEBUG(DBG_CRIT, "out of memory\n");
return NULL;
}
root->dl_count = 0;
- xmlDocPtr doc;
_findMetaXMLfiles(root, disc);
- uint8_t i;
for (i = 0; i < root->dl_count; i++) {
uint8_t *data = NULL;
size_t size;
@@ -173,6 +173,7 @@ META_ROOT *meta_parse(BD_DISC *disc)
if (!data || size == 0) {
BD_DEBUG(DBG_DIR, "Failed to read BDMV/META/DL/%s\n", root->dl_entries[i].filename);
} else {
+ xmlDocPtr doc;
doc = xmlReadMemory((char*)data, (int)size, NULL, NULL, 0);
if (doc == NULL) {
BD_DEBUG(DBG_DIR, "Failed to parse BDMV/META/DL/%s\n", root->dl_entries[i].filename);
More information about the libbluray-devel
mailing list