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
1a923e14
Commit
1a923e14
authored
Jul 22, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartztext: add missing sanity checks
parent
ffbc405d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
modules/text_renderer/quartztext.c
modules/text_renderer/quartztext.c
+7
-4
No files found.
modules/text_renderer/quartztext.c
View file @
1a923e14
...
@@ -322,7 +322,6 @@ static int RenderText(filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -322,7 +322,6 @@ static int RenderText(filter_t *p_filter, subpicture_region_t *p_region_out,
char
*
psz_fontname
;
char
*
psz_fontname
;
int
i_font_size
;
int
i_font_size
;
int
i_spacing
=
0
;
int
i_spacing
=
0
;
int
i_font_alpha
;
uint32_t
i_font_color
;
uint32_t
i_font_color
;
bool
b_bold
,
b_uline
,
b_italic
,
b_halfwidth
;
bool
b_bold
,
b_uline
,
b_italic
,
b_halfwidth
;
vlc_value_t
val
;
vlc_value_t
val
;
...
@@ -489,7 +488,8 @@ static int HandleFontAttributes(xml_reader_t *p_xml_reader,
...
@@ -489,7 +488,8 @@ static int HandleFontAttributes(xml_reader_t *p_xml_reader,
&
psz_fontname
,
&
psz_fontname
,
&
i_font_size
,
&
i_font_size
,
&
i_font_color
))
{
&
i_font_color
))
{
psz_fontname
=
strdup
(
psz_fontname
);
if
(
psz_fontname
)
psz_fontname
=
strdup
(
psz_fontname
);
i_font_size
=
i_font_size
;
i_font_size
=
i_font_size
;
}
}
i_font_alpha
=
(
i_font_color
>>
24
)
&
0xff
;
i_font_alpha
=
(
i_font_color
>>
24
)
&
0xff
;
...
@@ -498,7 +498,8 @@ static int HandleFontAttributes(xml_reader_t *p_xml_reader,
...
@@ -498,7 +498,8 @@ static int HandleFontAttributes(xml_reader_t *p_xml_reader,
while
((
attr
=
xml_ReaderNextAttr
(
p_xml_reader
,
&
value
)))
{
while
((
attr
=
xml_ReaderNextAttr
(
p_xml_reader
,
&
value
)))
{
if
(
!
strcasecmp
(
"face"
,
attr
))
{
if
(
!
strcasecmp
(
"face"
,
attr
))
{
free
(
psz_fontname
);
free
(
psz_fontname
);
psz_fontname
=
strdup
(
value
);
if
(
value
)
psz_fontname
=
strdup
(
value
);
}
else
if
(
!
strcasecmp
(
"size"
,
attr
))
{
}
else
if
(
!
strcasecmp
(
"size"
,
attr
))
{
if
((
*
value
==
'+'
)
||
(
*
value
==
'-'
))
{
if
((
*
value
==
'+'
)
||
(
*
value
==
'-'
))
{
int
i_value
=
atoi
(
value
);
int
i_value
=
atoi
(
value
);
...
@@ -744,6 +745,8 @@ static int ProcessNodes(filter_t *p_filter,
...
@@ -744,6 +745,8 @@ static int ProcessNodes(filter_t *p_filter,
int
len
;
int
len
;
// Turn any multiple-whitespaces into single spaces
// Turn any multiple-whitespaces into single spaces
if
(
!
node
)
break
;
char
*
dup
=
strdup
(
node
);
char
*
dup
=
strdup
(
node
);
if
(
!
dup
)
if
(
!
dup
)
break
;
break
;
...
@@ -883,7 +886,7 @@ static CGContextRef CreateOffScreenContext(int i_width, int i_height,
...
@@ -883,7 +886,7 @@ static CGContextRef CreateOffScreenContext(int i_width, int i_height,
*
pp_colorSpace
,
kCGImageAlphaPremultipliedFirst
);
*
pp_colorSpace
,
kCGImageAlphaPremultipliedFirst
);
if
(
p_context
)
{
if
(
p_context
)
{
if
(
CGContextSetAllowsAntialiasing
!=
NULL
)
if
(
&
CGContextSetAllowsAntialiasing
!=
NULL
)
CGContextSetAllowsAntialiasing
(
p_context
,
true
);
CGContextSetAllowsAntialiasing
(
p_context
,
true
);
}
}
*
pp_memory
=
p_bitmap
;
*
pp_memory
=
p_bitmap
;
...
...
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