summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mediarev.c5
-rw-r--r--src/tocxml.c3
-rw-r--r--src/xml.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/src/mediarev.c b/src/mediarev.c
index e8dd3e6..b81d8c6 100644
--- a/src/mediarev.c
+++ b/src/mediarev.c
@@ -75,10 +75,11 @@ med ** parsemediagz(char * media_path, int * no_of_media)
removeleadingspace(cur_line);
- if(!strncmp(cur_line,"set the filename of player \"player1\" to \"",41))
+ if(!strncmp(cur_line,"set the filename of player \"", 28))
{
/* todo: check if smil, if so follow to find uri */
- sscanf(cur_line,"set the filename of player \"player1\" to \"%s\"",cur_media->uri);
+ //sscanf(cur_line,"set the filename of player \"player1\" to \"%s\"",cur_media->uri);
+ sscanf(cur_line,"set the filename of player \"%[^\"] to \"%s\"",NULL,cur_media->uri);
cur_media->uri[strlen(cur_media->uri)-1] = '\0'; /* workaround extra character */
}
else if(!strncmp(cur_line,"set the label of this stack to \"",32))
diff --git a/src/tocxml.c b/src/tocxml.c
index 5fc7166..08ca12b 100644
--- a/src/tocxml.c
+++ b/src/tocxml.c
@@ -206,7 +206,8 @@ int cur_identifiers(char * filepath, char * title, issdates * date)
{
xmlDocPtr file;
- if((file = xmlParseFile(filepath)) == NULL)
+// if((file = xmlParseFile(filepath)) == NULL)
+ if((file = xmlReadFile(filepath, "ISO-8859-1", 0)) == NULL)
{
return 1;
}
diff --git a/src/xml.c b/src/xml.c
index 1a3ea3c..d822040 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -34,7 +34,8 @@ int ready_xml(char * filepath, char * rootnode, xmlDocPtr * file, xmlNodePtr * n
if(access(filepath, R_OK) != 0)
return 1;
- if((*file = xmlParseFile(filepath)) == NULL)
+// if((*file = xmlParseFile(filepath)) == NULL)
+ if((*file = xmlReadFile(filepath, "ISO-8859-1", 0)) == NULL)
{
fprintf(stderr, "Error: cannot open xml file %s\n", filepath);
return 1;