mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
Init/Cleanup libxml only once at VDR start/end. Copied from xmltv2vdr plugin.
This commit is contained in:
parent
234c855990
commit
d7aa09fec3
@ -12,7 +12,6 @@ cXmlParser::cXmlParser(void) {
|
||||
root = NULL;
|
||||
ctxt = NULL;
|
||||
|
||||
xmlInitParser();
|
||||
initGenericErrorDefaultFunc(NULL);
|
||||
xmlSetStructuredErrorFunc(NULL, SkinDesignerXMLErrorHandler);
|
||||
ctxt = xmlNewParserCtxt();
|
||||
@ -21,7 +20,6 @@ cXmlParser::cXmlParser(void) {
|
||||
cXmlParser::~cXmlParser() {
|
||||
DeleteDocument();
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
xmlCleanupParser();
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
@ -737,3 +735,11 @@ bool cXmlParser::DebugViewElement(xmlNodePtr node) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void cXmlParser::InitLibXML() {
|
||||
xmlInitParser();
|
||||
}
|
||||
|
||||
void cXmlParser::CleanupLibXML() {
|
||||
xmlCleanupParser();
|
||||
}
|
||||
|
@ -51,6 +51,8 @@ public:
|
||||
bool ParseView(void);
|
||||
bool ParseGlobals(void);
|
||||
void DeleteDocument(void);
|
||||
static void InitLibXML();
|
||||
static void CleanupLibXML();
|
||||
};
|
||||
|
||||
#endif //__XMLPARSER_H
|
@ -95,6 +95,7 @@ bool cPluginSkinDesigner::Initialize(void) {
|
||||
}
|
||||
|
||||
bool cPluginSkinDesigner::Start(void) {
|
||||
cXmlParser::InitLibXML();
|
||||
bool trueColorAvailable = true;
|
||||
if (!cOsdProvider::SupportsTrueColor()) {
|
||||
esyslog("skindesigner: No TrueColor OSD found! Using default Skin LCARS!");
|
||||
@ -121,6 +122,7 @@ bool cPluginSkinDesigner::Start(void) {
|
||||
void cPluginSkinDesigner::Stop(void) {
|
||||
delete imgCache;
|
||||
delete fontManager;
|
||||
cXmlParser::CleanupLibXML();
|
||||
}
|
||||
|
||||
void cPluginSkinDesigner::Housekeeping(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user