Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
e5451069
Commit
e5451069
authored
Feb 20, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libxml: fix plugin re-entrancy - refs #2541
parent
ebec76a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
modules/misc/xml/libxml.c
modules/misc/xml/libxml.c
+15
-2
No files found.
modules/misc/xml/libxml.c
View file @
e5451069
...
@@ -67,6 +67,9 @@ static void CatalogLoad( xml_t *, const char * );
...
@@ -67,6 +67,9 @@ static void CatalogLoad( xml_t *, const char * );
static
void
CatalogAdd
(
xml_t
*
,
const
char
*
,
const
char
*
,
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
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
* Module initialization
*****************************************************************************/
*****************************************************************************/
...
@@ -74,7 +77,13 @@ static int Open( vlc_object_t *p_this )
...
@@ -74,7 +77,13 @@ static int Open( vlc_object_t *p_this )
{
{
xml_t
*
p_xml
=
(
xml_t
*
)
p_this
;
xml_t
*
p_xml
=
(
xml_t
*
)
p_this
;
xmlInitParser
();
if
(
!
xmlHasFeature
(
XML_WITH_THREAD
)
)
return
VLC_EGENERIC
;
vlc_mutex_lock
(
&
lock
);
if
(
refs
++
==
0
)
xmlInitParser
();
vlc_mutex_unlock
(
&
lock
);
p_xml
->
pf_reader_create
=
ReaderCreate
;
p_xml
->
pf_reader_create
=
ReaderCreate
;
p_xml
->
pf_reader_delete
=
ReaderDelete
;
p_xml
->
pf_reader_delete
=
ReaderDelete
;
...
@@ -90,7 +99,11 @@ static int Open( vlc_object_t *p_this )
...
@@ -90,7 +99,11 @@ static int Open( vlc_object_t *p_this )
*****************************************************************************/
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
static
void
Close
(
vlc_object_t
*
p_this
)
{
{
xmlCleanupParser
();
vlc_mutex_lock
(
&
lock
);
if
(
--
refs
==
0
)
xmlCleanupParser
();
vlc_mutex_unlock
(
&
lock
);
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
p_this
);
return
;
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment