Commit e94b79b1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Revert "libxml: fix plugin re-entrancy - refs #2541"

Hmm, we lack API support in 0.9, so keep the old crashing behavior.

This reverts commit e5451069.
parent e5451069
......@@ -67,9 +67,6 @@ static void CatalogLoad( xml_t *, const char * );
static void CatalogAdd( xml_t *, const char *, const char *, const char * );
static int StreamRead( void *p_context, char *p_buffer, int i_buffer );
static unsigned refs = 0;
static vlc_mutex_t lock = VLC_STATIC_MUTEX;
/*****************************************************************************
* Module initialization
*****************************************************************************/
......@@ -77,13 +74,7 @@ static int Open( vlc_object_t *p_this )
{
xml_t *p_xml = (xml_t *)p_this;
if( !xmlHasFeature( XML_WITH_THREAD ) )
return VLC_EGENERIC;
vlc_mutex_lock( &lock );
if( refs++ == 0 )
xmlInitParser();
vlc_mutex_unlock( &lock );
xmlInitParser();
p_xml->pf_reader_create = ReaderCreate;
p_xml->pf_reader_delete = ReaderDelete;
......@@ -99,11 +90,7 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
static void Close( vlc_object_t *p_this )
{
vlc_mutex_lock( &lock );
if( --refs == 0 )
xmlCleanupParser();
vlc_mutex_unlock( &lock );
xmlCleanupParser();
VLC_UNUSED(p_this);
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment