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
3c777414
Commit
3c777414
authored
Aug 04, 2009
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
freetype: don't load/unload xml-module on every RenderHtml call
parent
09e36329
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
modules/misc/freetype.c
modules/misc/freetype.c
+8
-7
No files found.
modules/misc/freetype.c
View file @
3c777414
...
...
@@ -270,6 +270,7 @@ struct filter_sys_t
char
*
psz_fontfamily
;
bool
b_fontconfig_ok
;
FcConfig
*
p_fontconfig
;
xml_t
*
p_xml
;
#endif
input_attachment_t
**
pp_font_attachments
;
...
...
@@ -311,6 +312,7 @@ static int Create( vlc_object_t *p_this )
return
VLC_ENOMEM
;
#ifdef HAVE_FONTCONFIG
p_sys
->
psz_fontfamily
=
NULL
;
p_sys
->
p_xml
=
NULL
;
#endif
p_sys
->
p_face
=
0
;
p_sys
->
p_library
=
0
;
...
...
@@ -476,6 +478,7 @@ static void Destroy( vlc_object_t *p_this )
#ifdef HAVE_FONTCONFIG
FontBuilderDetach
(
p_filter
,
p_sys
->
p_fontbuilder
);
xml_Delete
(
p_sys
->
p_xml
);
free
(
p_sys
->
psz_fontfamily
);
#endif
...
...
@@ -2286,7 +2289,6 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
{
int
rv
=
VLC_SUCCESS
;
stream_t
*
p_sub
=
NULL
;
xml_t
*
p_xml
=
NULL
;
xml_reader_t
*
p_xml_reader
=
NULL
;
if
(
!
p_region_in
||
!
p_region_in
->
psz_html
)
...
...
@@ -2301,12 +2303,12 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
true
);
if
(
p_sub
)
{
p_xml
=
xml_Create
(
p_filter
);
if
(
p_xml
)
if
(
!
p_filter
->
p_sys
->
p_xml
)
p_filter
->
p_sys
->
p_xml
=
xml_Create
(
p_filter
);
if
(
p_
filter
->
p_sys
->
p_
xml
)
{
bool
b_karaoke
=
false
;
p_xml_reader
=
xml_ReaderCreate
(
p_xml
,
p_sub
);
p_xml_reader
=
xml_ReaderCreate
(
p_
filter
->
p_sys
->
p_
xml
,
p_sub
);
if
(
p_xml_reader
)
{
/* Look for Root Node */
...
...
@@ -2330,7 +2332,7 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
{
/* Only text and karaoke tags are supported */
msg_Dbg
(
p_filter
,
"Unsupported top-level tag '%s' ignored."
,
psz_node
);
xml_ReaderDelete
(
p_xml
,
p_xml_reader
);
xml_ReaderDelete
(
p_
filter
->
p_sys
->
p_
xml
,
p_xml_reader
);
p_xml_reader
=
NULL
;
rv
=
VLC_EGENERIC
;
}
...
...
@@ -2401,9 +2403,8 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
}
FreeLines
(
p_lines
);
xml_ReaderDelete
(
p_xml
,
p_xml_reader
);
xml_ReaderDelete
(
p_
filter
->
p_sys
->
p_
xml
,
p_xml_reader
);
}
xml_Delete
(
p_xml
);
}
stream_Delete
(
p_sub
);
}
...
...
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